Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

call .quote_value with column-parameter in patch #1362

  • Loading branch information...
commit d3cfb939e18f98e7b54015dd4d71160f9069e240 1 parent 1df2286
Marcel Jackwerth sirlantis authored
4 activerecord/lib/active_record/associations/through_association_scope.rb
View
@@ -30,7 +30,9 @@ def construct_conditions
# Associate attributes pointing to owner, quoted.
def construct_quoted_owner_attributes(reflection)
if as = reflection.options[:as]
- { "#{as}_id" => @owner.class.quote_value(@owner[reflection.active_record_primary_key]),
+ { "#{as}_id" => @owner.class.quote_value(
+ @owner[reflection.active_record_primary_key],
+ reflection.klass.columns_hash["#{as}_id"]),
"#{as}_type" => reflection.klass.quote_value(
@owner.class.base_class.name.to_s,
reflection.klass.columns_hash["#{as}_type"]) }
Please sign in to comment.
Something went wrong with that request. Please try again.