aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorWill St. Clair + Neeraj Singh <will@willstclair.com>2010-07-10 14:19:25 -0500
committerJosé Valim <jose.valim@gmail.com>2010-07-13 08:14:52 +0200
commitb520d602ffb85f3816f4407ff9dd5c7721a2da7d (patch)
treed89ca78e063bd39481fff93bae412a0efc6695ea /activerecord/lib/active_record
parent44e7fba59e251c1eb12d8f793a643b5804cb3977 (diff)
downloadrails-b520d602ffb85f3816f4407ff9dd5c7721a2da7d.tar.gz
rails-b520d602ffb85f3816f4407ff9dd5c7721a2da7d.tar.bz2
rails-b520d602ffb85f3816f4407ff9dd5c7721a2da7d.zip
string IDs are now quoted correctly [#5064 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/through_association_scope.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/through_association_scope.rb b/activerecord/lib/active_record/associations/through_association_scope.rb
index 22e1033a9d..cabb33c4a8 100644
--- a/activerecord/lib/active_record/associations/through_association_scope.rb
+++ b/activerecord/lib/active_record/associations/through_association_scope.rb
@@ -35,7 +35,7 @@ module ActiveRecord
@owner.class.base_class.name.to_s,
reflection.klass.columns_hash["#{as}_type"]) }
elsif reflection.macro == :belongs_to
- { reflection.klass.primary_key => @owner[reflection.primary_key_name] }
+ { reflection.klass.primary_key => @owner.class.quote_value(@owner[reflection.primary_key_name]) }
else
{ reflection.primary_key_name => owner_quoted_id }
end