single-table-inheritance
Class Inheritance or Single Table Inheritance in Rails 2.3
I have the following scenario and I\'m not sure if I should use Class Inheritance or Single Table Inheritance:[详细]
2023-01-25 13:14 分类:问答rails redirect to the template of superclass if template is missing for some subclass
I am using Single-Table-Inheritance for a rails project. And I was wondering if it were possible to share functionality for some common functions between subclasses by implementing them in the supercl[详细]
2023-01-25 06:52 分类:问答Rails STI Association and nested resources
Ok, so I\'ve got a weird pattern here that I can\'t figure out. I have an STI set with CallList as the base model, and City & State inherited. A city belongs to a state (and a state has many citi[详细]
2023-01-25 03:19 分类:问答ActiveRecord::SubclassNotFound error when using STI in Rails
I am using Ruby on Rails 2.3.10. I have a class, School. I use STI to give me several subclasses: PrimarySchool, SecondarySchool and University.[详细]
2023-01-24 11:36 分类:问答Rails 3 single table inheritence w/ has_many question
I\'ve been trying to setup a Single Table Inheritance model in Rails开发者_开发技巧 3 in which the parent class also contains a has_many relationship.Unfortunately I can\'t get it to work.Here are thr[详细]
2023-01-22 03:31 分类:问答single-table-per-hierarchy mapping error
I got the following mappings <?xml version=\"1.0\" encoding=\"utf-8\" ?> <hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\" auto-import=\"false\">[详细]
2023-01-18 16:58 分类:问答How to write unit tests for STI associations Ruby on Rails
What steps should you use when in a need to write unit tests for STI associations. I am completely confused. Please provide 开发者_如何学Csome suggestions or links to some tutorials.[详细]
2023-01-17 10:28 分类:问答Is Single-Table Inheritance the right solution for my Rails problem?
Greetings, all, I\'m working on an application in Ruby on Rails where we need to keep track of a bunch of external services for each user (for example, Facebook, MySpace, Google, SalesForce, Twitter,[详细]
2023-01-17 06:12 分类:问答Rails Single Table Inheritance using Foreign Key (ID)
I have to model an association structure and the association is divided into divisions/subdivisions/sections etc. So I\'ve created a simple Entity-Attribute Model:[详细]
2023-01-16 01:28 分类:问答Is a polymorphic association appropriate here?
Here\'s what I\'m thinking: class Widget < ActiveRecord::Base has_one :widget_la开发者_Go百科yout[详细]
2023-01-15 01:25 分类:问答