From 5931a1dbd3d067d9d4cb33b0344a9a7931bb681b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 23 Aug 2010 13:57:22 -0700 Subject: sql literal strings should be marked as sql literal strings --- activerecord/lib/active_record/relation/query_methods.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 0b5e9b4fb2..8ccc62c9d1 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -121,8 +121,10 @@ module ActiveRecord when Hash, Array, Symbol if array_of_strings?(join) join_string = join.join(' ') - arel = arel.join(join_string) + arel = arel.join(Arel::SqlLiteral.new(join_string)) end + when String + arel = arel.join(Arel::SqlLiteral.new(join)) else arel = arel.join(join) end -- cgit v1.2.3