Matt Scilipoti
Not a member
Matt Scilipoti's latest activity
Wednesday, August 25 2010
5451
belongs_to relationship creation should fail if foreign key does not exist.
was updated
in Ruby on Rails
-
Matt Scilipoti commented at 2:15 PMThis test identifies the issue but, it may be better to use:
item_a = ItemA.create!("name" => "Apple") assert_raise <insert appropriate error here> do item_b... -
Matt Scilipoti created the ticket at 2:40 AMItemA belongs_to ItemB
item_b_id is not in table ItemAs.ItemA.new.create_item_b -> does NOT raise error
A new ItemB is saved to db.
ItemA.first.item_b == nil
E...