Displaying 1 result from an estimated 1 matches for "find_by_car".
Did you mean:
find_by_bar
2006 Jan 13
6
Locating Objects by associated object.properties
...of this, so forgive me if this is a stupid
question...
- I have two models/tables: Owners and Cars
- Owners may have many cars. Cars have one owner.
- Cars have a property named Color.
Question: how do I get a list of all the Owners who have RED cars?
I want something like this to work:
Owner.find_by_car.color("RED")
Thanks for any help!
--
Posted via http://www.ruby-forum.com/.