diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-05-03 00:49:33 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-05-04 12:50:07 +0100 |
commit | 780e8939c0f76399c76b13539f1ffe2d0940d941 (patch) | |
tree | 3e8e4984ad5238be6ea6eeb147e12f801c26835e | |
parent | 4bd9482a1a890c50264b4a9320e6853f1a0bde69 (diff) | |
download | rails-780e8939c0f76399c76b13539f1ffe2d0940d941.tar.gz rails-780e8939c0f76399c76b13539f1ffe2d0940d941.tar.bz2 rails-780e8939c0f76399c76b13539f1ffe2d0940d941.zip |
#to_sym is unnecessary
-rw-r--r-- | activerecord/lib/active_record/dynamic_matchers.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/dynamic_matchers.rb b/activerecord/lib/active_record/dynamic_matchers.rb index 96a3a69d0d..1a057ea25e 100644 --- a/activerecord/lib/active_record/dynamic_matchers.rb +++ b/activerecord/lib/active_record/dynamic_matchers.rb @@ -63,15 +63,15 @@ module ActiveRecord def expand_attribute_names_for_aggregates attribute_names.map do |attribute_name| if aggregation = model.reflect_on_aggregation(attribute_name.to_sym) - aggregation.mapping.map { |m| m.first.to_sym } + aggregation.mapping.map(&:first) else - attribute_name.to_sym + attribute_name end end.flatten end def valid? - (expand_attribute_names_for_aggregates - model.column_methods_hash.keys).empty? + (expand_attribute_names_for_aggregates - model.column_names).empty? end def define |