Permalink
Browse files

we should wrap strings as sql literals

  • Loading branch information...
1 parent bef90f8 commit 1ef9b98a31f6a844d79997e86460c2335217ab2c @tenderlove tenderlove committed Aug 19, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation/query_methods.rb
View
2 activerecord/lib/active_record/relation/query_methods.rb
@@ -229,7 +229,7 @@ def build_select(arel, selects)
arel.project(selects.last)
end
else
- arel.project(@klass.quoted_table_name + '.*')
+ arel.project(Arel::SqlLiteral.new(@klass.quoted_table_name + '.*'))
end
end

0 comments on commit 1ef9b98

Please sign in to comment.