提交 6b5fab93 编写于 作者: E Emilio Tagua

Don't scope order in calculations.'

上级 04abe538
......@@ -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])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册