A person has_many cars.
A car has_many lights.
Can I write a person has_many lights?
A snippet of code to help me understand will help.
A person has_many cars.
A car has_many lights.
Can I write a person has_many lights?
A snippet of code to help me understand will help.
2009/7/1 Raj S. [email protected]:
A person has_many cars.
A car has_many lights.
Can I write a person has_many lights?
A snippet of code to help me understand will help.
Try person has_many :lights, :through => :cars
See
for lots of examples of such things.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs