search for: mother_id

Displaying 2 results from an estimated 2 matches for "mother_id".

Did you mean: other_id
2008 May 27
2
HABTM using two columns
Hi all, I was wondering whether anyone could guide me to docu and code examples how to create and use a has_and_belongs_to_many relationship with a joining table where TWO columns are used to identify the relation to TWO alternative tables. Example: table 1: mothers [mother_id, name] table 2: fathers [father_id, name] table 3: children [child_id, name] joining table 4: children_parent [child_id, parent_id, parent_type] ''parent type'' can be either ''mother'' or ''father'', and depending on this, the ''parent_i...
2006 Aug 12
10
adding extra variable to a class, how to access it?
somple question here but pretty confusing on my side. i have a model towns that is mapped to my towns table. can i add an extra variable to the class and access it in my view? basicall what i am trying to do is return a list of towns, and next to each town, display a total number of what i have in each town. ive tried both attr_reader and @total but no avail. here is my view <% for