提交 23b03bab 编写于 作者: A Aaron Patterson

use the sql literal factory method

上级 0fbf829b
......@@ -174,7 +174,7 @@ def update_all(updates, conditions = nil, options = {})
order = arel.orders
end
stmt = arel.compile_update(Arel::SqlLiteral.new(@klass.send(:sanitize_sql_for_assignment, updates)))
stmt = arel.compile_update(Arel.sql(@klass.send(:sanitize_sql_for_assignment, updates)))
stmt.take limit
stmt.order(*order)
stmt.key = @klass.arel_table[@klass.primary_key]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册