Skip to content
This repository
Browse code

marking sql literals as sql literals

  • Loading branch information...
commit 6f4d100761f3dd453e9049837c61d6cf025fc03c 1 parent ecbdec1
Aaron Patterson authored August 23, 2010
2  activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -24,7 +24,7 @@ def has_primary_key?
24 24
 
25 25
       protected
26 26
         def construct_find_options!(options)
27  
-          options[:joins]      = @join_sql
  27
+          options[:joins]      = Arel::SqlLiteral.new @join_sql
28 28
           options[:readonly]   = finding_with_ambiguous_select?(options[:select] || @reflection.options[:select])
29 29
           options[:select]   ||= (@reflection.options[:select] || '*')
30 30
         end

0 notes on commit 6f4d100

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