aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-06-10 08:47:49 +0200
committerYves Senn <yves.senn@gmail.com>2014-06-10 08:48:33 +0200
commit44b7d6c41610bb8ddd058b3815543985f65bf7ad (patch)
tree1f8883f406a75d099acca4b3fc525aaaa4a9de41 /activerecord/lib
parent8ed1dec25e8a818edca1fec3f064b9937326836c (diff)
parent9feb4a8b5c4c9834986c7451bac078b37ed554b2 (diff)
downloadrails-44b7d6c41610bb8ddd058b3815543985f65bf7ad.tar.gz
rails-44b7d6c41610bb8ddd058b3815543985f65bf7ad.tar.bz2
rails-44b7d6c41610bb8ddd058b3815543985f65bf7ad.zip
Merge pull request #15584 from jamesyang124/issue_15382
ActiveRecord::FinderMethods.find doesn't pass proc parameter to array Manual merge of #15584. Closes #15584.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 47e90e9021..0c9c761f97 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -65,7 +65,7 @@ module ActiveRecord
# # returns an Array of the required fields, available since Rails 3.1.
def find(*args)
if block_given?
- to_a.find { |*block_args| yield(*block_args) }
+ to_a.find(*args) { |*block_args| yield(*block_args) }
else
find_with_ids(*args)
end