diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-01 17:56:27 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-07-01 17:56:47 -0700 |
commit | b7aba569c871e09fa8227175626ff09e7e6638de (patch) | |
tree | 4904f682e267bedab23dede2ec3ff57966828ead /activerecord | |
parent | 11c2e80babdca378dc035d1529ea336004c72d75 (diff) | |
download | rails-b7aba569c871e09fa8227175626ff09e7e6638de.tar.gz rails-b7aba569c871e09fa8227175626ff09e7e6638de.tar.bz2 rails-b7aba569c871e09fa8227175626ff09e7e6638de.zip |
only deal with strings internally
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/calculations.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index 7d745c757b..07410884a7 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -138,9 +138,9 @@ module ActiveRecord def pluck(*column_names) column_names.map! do |column_name| if column_name.is_a?(Symbol) && attribute_alias?(column_name) - attribute_alias(column_name).to_sym + attribute_alias(column_name) else - column_name + column_name.to_s end end @@ -149,7 +149,7 @@ module ActiveRecord else relation = spawn relation.select_values = column_names.map { |cn| - columns_hash.key?(cn.to_s) ? arel_table[cn] : cn + columns_hash.key?(cn) ? arel_table[cn] : cn } result = klass.connection.select_all(relation.arel, nil, bind_values) columns = result.columns.map do |key| |