diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 43032ba9d8..e8d0f215f6 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -22,9 +22,9 @@ module ActiveRecord end class_eval <<-CEVAL, __FILE__, __LINE__ + 1 - def select(*args, &block) + def select(*args) if block_given? - to_a.select(&block) + to_a.select { |*block_args| yield(*block_args) } else new_relation = clone value = Array.wrap(args.flatten).reject {|x| x.blank? } |