From a8ede3664055f33c102b3f229cf280b0bf69c540 Mon Sep 17 00:00:00 2001 From: Dan Erikson Date: Mon, 8 Apr 2013 00:41:16 -0600 Subject: Changed ActiveRecord::Associations::CollectionProxy#select to take multiple arguments. This makes the arguments the same as ActiveRecord::QueryMethods::select. --- activerecord/lib/active_record/associations/collection_association.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/associations/collection_association.rb') diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 2a00ac1386..5b08d07425 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -67,11 +67,11 @@ module ActiveRecord @target = [] end - def select(select = nil) + def select(*fields) if block_given? load_target.select.each { |e| yield e } else - scope.select(select) + scope.select(*fields) end end -- cgit v1.2.3