Displaying 2 results from an estimated 2 matches for "sports_id".
Did you mean:
sport_id
2006 Jun 17
5
STI versus Composition...or the headaches of one big table
...to add or delete properties of one of the above categories and
having to process every row in the entire table.
I''m trying to get my head around the best way to do this. I''d like to
break it out via composition, but having a Autos table with an suv_id,
mini_id, mid_id, and sports_id (for all possible combos) seems like
really bad design.
I suppose I could have the Autos table have a sub_type_id and sub_type
column, and somehow use this to map. However, I''m unsure how to go about
this...composed_of doesn''t seem to be designed with this situation in mind...
2006 Jul 27
2
Saving records in mySQL for many-to-many relationship
Hey guys,
Maybe someone could point out what wrong here. I''ve simplified the issue
to this:
Both User.find(6) and Sport.find(1) exist, Im just trying to setup the
relationship between them.
My controller looks like this
def tester
@c = User.find(6)
@c.sports = Sport.find(1)
end
And I keep getting this error:
undefined method `each'' for #<Sport:0x36a3488