aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-23 13:29:55 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-23 13:30:12 -0700
commitee9e1570befe6e624264d137a442745efd1f147d (patch)
treebdf624de52383f2e66e3248823dbec655fd50324
parent6d796a71d2e4ad0baec12b89da0b4b3470eebab1 (diff)
downloadrails-ee9e1570befe6e624264d137a442745efd1f147d.tar.gz
rails-ee9e1570befe6e624264d137a442745efd1f147d.tar.bz2
rails-ee9e1570befe6e624264d137a442745efd1f147d.zip
we should mark strings as SQL Literal values
-rw-r--r--activerecord/lib/active_record/relation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index 03b06205d4..b7ed81c300 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -154,7 +154,7 @@ module ActiveRecord
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