aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/associations/association_scope.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb
index 519d4d8651..4c47af8cb0 100644
--- a/activerecord/lib/active_record/associations/association_scope.rb
+++ b/activerecord/lib/active_record/associations/association_scope.rb
@@ -115,7 +115,7 @@ module ActiveRecord
if reflection.type
value = owner.class.base_class.name
- bind_val = bind scope, table.table_name, reflection.type.to_s, value, tracker
+ bind_val = bind scope, table.table_name, reflection.type, value, tracker
scope = scope.where(table[reflection.type].eq(bind_val))
end
else
@@ -123,7 +123,7 @@ module ActiveRecord
if reflection.type
value = chain[i + 1].klass.base_class.name
- bind_val = bind scope, table.table_name, reflection.type.to_s, value, tracker
+ bind_val = bind scope, table.table_name, reflection.type, value, tracker
scope = scope.where(table[reflection.type].eq(bind_val))
end