Permalink
Browse files

Don't scope order in calculations.'

  • Loading branch information...
1 parent 04abe53 commit 6b5fab9300c3e5f2852409ad589d2166373787e7 @miloops miloops committed Aug 7, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/calculations.rb
View
2 activerecord/lib/active_record/calculations.rb
@@ -155,7 +155,7 @@ def calculate(operation, column_name, options = {})
relation.where(construct_conditions(options[:conditions], scope))
relation.where(construct_arel_limited_ids_condition(options, join_dependency)) if join_dependency && !using_limitable_reflections?(join_dependency.reflections) && ((scope && scope[:limit]) || options[:limit])
- relation.order(construct_order(options[:order], scope))
+ relation.order(options[:order])
relation.take(options[:limit])
relation.skip(options[:offset])

0 comments on commit 6b5fab9

Please sign in to comment.