This project is archived and is in readonly mode.
Rails 3.0.3 has many#create does not create a record
-
Matt Fawcett
This won't be a Rails problem. Its likely that
new_table.attributesis returning a hash which has a key:organizing_city_idwith a value ofnil, causing the table to get saved without the foreign key. -
Rob Westgeest
You're right!. changing the first spec to:
it "through tables#create add a table to the has_many association" do organizing_city = create_organizing_city table_attributes = new_table.attributes table_attributes.delete "organizing_city_id" organizing_city.tables.create table_attributes organizing_city.reload organizing_city.tables.size.should == 1 endmakes it pass.
Sorry to have poluted this list with a worthless ticket. This can be closed.
-
Rohit Arondekar
- State changed from new to invalid
- Importance changed from to Low