Hi!
I have a User model that has_and_belongs_to_many Awards.
The awards table is pre-populated, and there's an awards_users join
table.
In a rails console, If I do:
u = User.find(1)
u.awards.build(award_id: 1)
the award model that is built is an actual Award model, not an
AwardsUser model, like
On 24 April 2013 09:19, Paul Ols li...@ruby-forum.com wrote:
Hi!
I have a User model that has_and_belongs_to_many Awards.
The awards table is pre-populated, and there's an awards_users join
table.
In a rails console, If I do:
u = User.find(1)
u.awards.build(award_id: 1)
the award model
2 matches
Mail list logo