Skip to content
Browse files

select does not need a *args

  • Loading branch information...
1 parent a461c2b commit b8899bba12098cccf98f7959c07ad2545f854b6c @tenderlove tenderlove committed Sep 7, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/relation/query_methods.rb
View
4 activerecord/lib/active_record/relation/query_methods.rb
@@ -29,12 +29,12 @@ def preload(*args)
relation
end
- def select(*args)
+ def select(value = nil)
if block_given?
to_a.select {|*block_args| yield(*block_args) }
else
relation = clone
- relation.select_values += args if args.present?
+ relation.select_values += [value] if value
relation
end
end

0 comments on commit b8899bb

Please sign in to comment.
Something went wrong with that request. Please try again.