Displaying 1 result from an estimated 1 matches for "create_pirate".
2012 Feb 23
1
Bug in nested_attributes_for: question about best way to patch
...has been destroyed.
Here is a test demonstrating the error and the expectations:
def
test_should_destroy_an_existing_record_if_there_is_a_matching_id_and_destroy_is_truthy
@ship.pirate.destroy
[1, ''1'', true, ''true''].each do |truth|
pirate = @ship.reload.create_pirate(:catchphrase => ''Arr'')
@ship.update_attributes(:pirate_attributes => { :id =>
pirate.id, :_destroy => truth })
assert_raise(ActiveRecord::RecordNotFound) { pirate.reload }
end
end
I''ve also a partial patch developed: http://pastie.org/3438962
The p...