This project is archived and is in readonly mode.
Changeset [fdfc8e3b9c4905057677fd009f463a377be60b93] by toby cabot
Revision fdfc8e3b9c4905057677fd009f463a377be60b93,
committed by toby cabot
· October 21st, 2010 @ 01:23 AM
bug 1108: fix a bug with find_or_create_by and additional values
There was a bug with find_or_create_by_x introduced in 2.3.9 -
if you
included extra parameters for the create() then those parameters
would
confuse the find() so you'd never get to the create(). This
patch
filters the parameters so we only pass to find() the subset that
it's
interested in. The code for the filtering was modelled on the code
in
base.rb's method_missing().
http://github.com/rails/rails/commit/fdfc8e3b9c4905057677fd009f463a...
2 changed files
-
M
activerecord/lib/active_record/associations/association_collection.rb -
M
activerecord/test/cases/associations/has_many_associations_test.rb