Permalink
Browse files

we should mark strings as SQL Literal values

  • Loading branch information...
1 parent ce04ea9 commit eeb9b379f9dba0c692856b2f5576cd30a12887e1 @tenderlove tenderlove committed Aug 23, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation.rb
@@ -154,7 +154,7 @@ def update_all(updates, conditions = nil, options = {})
else
# Apply limit and order only if they're both present
if @limit_value.present? == @order_values.present?
- arel.update(@klass.send(:sanitize_sql_for_assignment, updates))
+ arel.update(Arel::SqlLiteral.new(@klass.send(:sanitize_sql_for_assignment, updates)))
else
except(:limit, :order).update_all(updates)
end

0 comments on commit eeb9b37

Please sign in to comment.