Skip to content
Browse files

sql literal strings should be marked as sql literal strings

  • Loading branch information...
1 parent eeb9b37 commit 1cc653f9b3b975747dae5049994147d641f4d39e @tenderlove tenderlove committed Aug 23, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 activerecord/lib/active_record/relation/query_methods.rb
View
4 activerecord/lib/active_record/relation/query_methods.rb
@@ -121,8 +121,10 @@ def custom_join_sql(*joins)
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

0 comments on commit 1cc653f

Please sign in to comment.
Something went wrong with that request. Please try again.