Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

doesn't make sense for select! to take a block

  • Loading branch information...
commit 7e0b6b25288c753071c0d36eea1772776b2fcc2a 1 parent be89e9a
Jon Leighton jonleighton authored
Showing with 3 additions and 8 deletions.
  1. +3 −8 activerecord/lib/active_record/relation/query_methods.rb
11 activerecord/lib/active_record/relation/query_methods.rb
View
@@ -99,14 +99,9 @@ def select(value = Proc.new)
end
end
- def select!(value = Proc.new)
- if block_given?
- # TODO: test
- to_a.select! { |*block_args| value.call(*block_args) }
- else
- self.select_values += Array.wrap(value)
- self
- end
+ def select!(value)
+ self.select_values += Array.wrap(value)
+ self
end
def group(*args)
Please sign in to comment.
Something went wrong with that request. Please try again.