diff options
author | Bart de Water <bartdewater@gmail.com> | 2018-07-28 19:17:15 -0400 |
---|---|---|
committer | Bart de Water <bartdewater@gmail.com> | 2018-07-28 19:17:15 -0400 |
commit | 27c6c071165342c770ed9c697024aa101dad4049 (patch) | |
tree | 244ed8c81174abd2ae651f93781425f518688be9 /activerecord/lib | |
parent | 5b81bb1567a826d32f7013db42372a91c3753b35 (diff) | |
download | rails-27c6c071165342c770ed9c697024aa101dad4049.tar.gz rails-27c6c071165342c770ed9c697024aa101dad4049.tar.bz2 rails-27c6c071165342c770ed9c697024aa101dad4049.zip |
Fix TypeError: no implicit conversion of Arel::Attributes::Attribute into String
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index 3c45462f46..40fe39fa9d 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -245,7 +245,7 @@ module ActiveRecord if distinct && (group_values.any? || select_values.empty? && order_values.empty?) column_name = primary_key end - elsif /\s*DISTINCT[\s(]+/i.match?(column_name) + elsif /\s*DISTINCT[\s(]+/i.match?(column_name.to_s) distinct = nil end end |