Permalink
Browse files

No need to use symbols

  • Loading branch information...
1 parent 141313c commit c507f9f4c96ffb19345759bde3e871509c9a905e @rafaelfranca rafaelfranca committed Feb 17, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/relation/query_methods.rb
@@ -240,7 +240,7 @@ def select(*fields)
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 @@ def preprocess_order_args(order_args)
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

0 comments on commit c507f9f

Please sign in to comment.