diff options
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 842fb1c54b..a0f6ada3ff 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -93,7 +93,7 @@ module ActiveRecord if mapping.length == 1 column_name, aggr_attr = mapping.first values = Array.wrap(value).map do |object| - object.respond_to?(aggr_attr) ? object.send(aggr_attr) : object + object.respond_to?(aggr_attr) ? object.public_send(aggr_attr) : object end build(table.arel_attribute(column_name), values) else |