aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/dynamic_matchers.rb6
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