diff options
author | Xavier Noria <fxn@hashref.com> | 2010-07-30 02:35:24 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-07-30 02:35:24 +0200 |
commit | ccd45618ed9a629c9535a5ff84ef5c238befa4ab (patch) | |
tree | 0a582bf695dce01240762d2b8516efde43bc3515 /activerecord/lib/active_record/associations | |
parent | 3c3ff1377d17b584dd14d85c7cecab59ddff2679 (diff) | |
parent | 755af497555fde16db86f7e51f6462b0aca79b49 (diff) | |
download | rails-ccd45618ed9a629c9535a5ff84ef5c238befa4ab.tar.gz rails-ccd45618ed9a629c9535a5ff84ef5c238befa4ab.tar.bz2 rails-ccd45618ed9a629c9535a5ff84ef5c238befa4ab.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 4ce3b34819..b5159eead3 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -422,7 +422,7 @@ module ActiveRecord match = DynamicFinderMatch.match(method) if match && match.creator? attributes = match.attribute_names - return send(:"find_by_#{attributes.join('and')}", *args) || create(Hash[attributes.zip(args)]) + return send(:"find_by_#{attributes.join('_and_')}", *args) || create(Hash[attributes.zip(args)]) end if @target.respond_to?(method) || (!@reflection.klass.respond_to?(method) && Class.respond_to?(method)) |