diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-04 16:22:16 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-04 16:24:01 -0700 |
commit | 117b096d0a91ff7a8fb704b359a6fdf1ccc20e7c (patch) | |
tree | e14dfb6ac48b7a7a2e88d800eda0091a93bcb666 | |
parent | 3cbe111439b22f11670587e2ec6779533dd77090 (diff) | |
download | rails-117b096d0a91ff7a8fb704b359a6fdf1ccc20e7c.tar.gz rails-117b096d0a91ff7a8fb704b359a6fdf1ccc20e7c.tar.bz2 rails-117b096d0a91ff7a8fb704b359a6fdf1ccc20e7c.zip |
avoid passing lists of lists to the group clause
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 5ef00206dd..e71f1cca72 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -31,7 +31,7 @@ module ActiveRecord end def group(*args) - clone.tap {|r| r.group_values += args if args.present? } + clone.tap {|r| r.group_values += args.flatten if args.present? } end def order(*args) |