Skip to content

Commit

Permalink
call .quote_value with column-parameter in patch rails#1362
Browse files Browse the repository at this point in the history
  • Loading branch information
NDMarcel committed May 27, 2011
1 parent 1df2286 commit d3cfb93
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -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"]) }
Expand Down

0 comments on commit d3cfb93

Please sign in to comment.