search for: haircolor

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

Did you mean: hair_color
2009 Feb 15
3
conditions on association include, hacky but more or less solved
...(params[:id]) @traits = Trait.find :all, :include => [:trait_values => [:key_factors]] but I only want the key_factors that connect to the given entity to be loaded. E.g. I have entities Jane and Marco, and traits Height (with values Short, Medium, and Tall) and HairColor (with values Red, Brown, and Black). Key factors connect an entity with a trait value and an additional descriptor; if Jane is very tall and has reddish-brown hair there would be three key factors Jane-Tall(Height)-Very, Jane-Red (HairColor)-Somewhat, and Jane-Brown(HairColor)-Somewhat. I want an...