Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

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
    Matt Scilipoti commented at 2:15 PM

    This 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
    Matt Scilipoti created the ticket at 2:40 AM

    ItemA 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...