diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-06-22 10:46:12 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-22 16:44:10 +0200 |
commit | 7df105b1e604846f5dfe184128f99499da477bbe (patch) | |
tree | 2f407e11d2110bc993f981e36dba03973a916466 /activerecord/lib/active_record/relation/query_methods.rb | |
parent | df595b577edf807c3b9315feb882d12d9b249af9 (diff) | |
download | rails-7df105b1e604846f5dfe184128f99499da477bbe.tar.gz rails-7df105b1e604846f5dfe184128f99499da477bbe.tar.bz2 rails-7df105b1e604846f5dfe184128f99499da477bbe.zip |
Fix order method to accept relation attributes.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 60fa839df2..43032ba9d8 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -137,7 +137,7 @@ module ActiveRecord arel = arel.group(*@group_values.uniq.select{|g| g.present?}) if @group_values.present? - arel = arel.order(*@order_values.uniq.select{|o| o.present?}.map(&:to_s)) if @order_values.present? + arel = arel.order(*@order_values.uniq.select{|o| o.present?}) if @order_values.present? selects = @select_values.uniq |