rails/rails — Issue #3472: first_or_create behaviour
Author: slbug
Created: 2011-10-30 22:08:27+00:00
State: open

Isn't it should work something like old find_or_create_by method? If so then

parrot = Bird.first_or_create!(:color => 'green', :name => 'parrot')
the_same_parrot = Bird.first_or_create!(:color => 'yellow', :name => 'macaw')
assert_equal parrot, the_same_parrot

should fail, because the_same_parrot should create new Bird with yellow color and macaw name, not same thing as parrot.