search for: rulesspace

Displaying 1 result from an estimated 1 matches for "rulesspace".

Did you mean: rulespace
2006 May 12
1
can I fake has_one :through?
...''m having a difficult time wrapping my head around a set of models and their associations and seeing how they map into Rails. I''ll try to lay out my problem using the has_many and belongs_to structures. I have a RuleSpace, a Rule, and a Subject. A RuleSpace has_many Rules A RulesSpace has_many Subjects through Rules A Rule belongs_to (many) RuleSpaces A Rule has_many Subjects A Subject has_one Rule A Subject has_one RuleSpace So given a single Subject I should be able to find a single Rule and a single RuleSpace. Going the other way, given a RuleSpace I should find many S...