aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-23 17:26:47 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-23 18:48:29 -0700
commit6f4d100761f3dd453e9049837c61d6cf025fc03c (patch)
treea29b5fb3047661eeed88b4a18d4d5cb5d1e4f261
parentecbdec115bc87636f975b962bff7a9ac89a145fa (diff)
downloadrails-6f4d100761f3dd453e9049837c61d6cf025fc03c.tar.gz
rails-6f4d100761f3dd453e9049837c61d6cf025fc03c.tar.bz2
rails-6f4d100761f3dd453e9049837c61d6cf025fc03c.zip
marking sql literals as sql literals
-rw-r--r--activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
index 862a19587d..e983f86f9e 100644
--- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
+++ b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -24,7 +24,7 @@ module ActiveRecord
protected
def construct_find_options!(options)
- options[:joins] = @join_sql
+ options[:joins] = Arel::SqlLiteral.new @join_sql
options[:readonly] = finding_with_ambiguous_select?(options[:select] || @reflection.options[:select])
options[:select] ||= (@reflection.options[:select] || '*')
end