diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-07 10:33:08 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-07 10:33:20 -0700 |
commit | d00f1c18eb2d113095e2d21d6876010a748037b0 (patch) | |
tree | ba8b30b4a9c1b2e0156196d7afe92b3654a9094f /activerecord/lib | |
parent | 816ea74c8ebc7f4115721751dceaf8c83b2de38a (diff) | |
download | rails-d00f1c18eb2d113095e2d21d6876010a748037b0.tar.gz rails-d00f1c18eb2d113095e2d21d6876010a748037b0.tar.bz2 rails-d00f1c18eb2d113095e2d21d6876010a748037b0.zip |
select does not need a *args
Diffstat (limited to 'activerecord/lib')
-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 f410492b0a..22c605e9d0 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -29,12 +29,12 @@ module ActiveRecord 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 |