search for: create_association

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

2009 Dec 25
2
Understanding “create_association” and invalid objects
The documentation on the “create_association” method of the “belongs_to” association reads: > create_association(attributes = {}) > Returns a new object of the associated type that has been instantiated with attributes, linked to this object through a foreign key, and that has already been saved (if it passed the validation).* My exp...
2010 Feb 24
4
"Sequence does not exist" for joined model
...on everything went haywire. Well, I''ve refactored several problems and now I have another. I have two models with a many to many relationship and additional join model. This model has no PK id. When I try to do a create() to this model, BLAM! I get this... Processing ReviewsController#create_association (for 10.242.2.10 at 2010-02-24 15:29:08) [GET] Parameters: {"review"=>{"irb_id"=>["35540"]}, "action"=>"create_association", "id"=>"1", "controller"=>"reviews"} ActiveRecord::StatementInvalid...