diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-16 21:49:28 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-16 21:49:50 -0300 |
commit | c507f9f4c96ffb19345759bde3e871509c9a905e (patch) | |
tree | b9b864b701a6e4284491d6d91ef11ff7c1d5d262 /activerecord/lib/active_record/relation | |
parent | 141313c6510bb87985969f4dc31dedc46b7e4c76 (diff) | |
download | rails-c507f9f4c96ffb19345759bde3e871509c9a905e.tar.gz rails-c507f9f4c96ffb19345759bde3e871509c9a905e.tar.bz2 rails-c507f9f4c96ffb19345759bde3e871509c9a905e.zip |
No need to use symbols
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 077f09b67d..e2a1af7342 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -240,7 +240,7 @@ module ActiveRecord def select!(*fields) # :nodoc: fields.flatten! fields.map! do |field| - klass.attribute_alias?(field) ? klass.attribute_alias(field).to_sym : field + klass.attribute_alias?(field) ? klass.attribute_alias(field) : field end self.select_values += fields self @@ -1052,11 +1052,11 @@ module ActiveRecord order_args.map! do |arg| case arg when Symbol - arg = klass.attribute_alias(arg).to_sym if klass.attribute_alias?(arg) + arg = klass.attribute_alias(arg) if klass.attribute_alias?(arg) table[arg].asc when Hash arg.map { |field, dir| - field = klass.attribute_alias(field).to_sym if klass.attribute_alias?(field) + field = klass.attribute_alias(field) if klass.attribute_alias?(field) table[field].send(dir) } else |