aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-18 21:09:28 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-18 21:09:28 -0300
commit57cf426e614be55c167b7e6ff04728da21ba5d33 (patch)
tree8af3d3d4ffaddac33e252222392b5db0fc16783d /activerecord/lib
parent6956dfcaa2733948337f1074057221e7ab85f3b4 (diff)
parent0e0e0db416fc193766f0b21d61fc8f9dfadfe95e (diff)
downloadrails-57cf426e614be55c167b7e6ff04728da21ba5d33.tar.gz
rails-57cf426e614be55c167b7e6ff04728da21ba5d33.tar.bz2
rails-57cf426e614be55c167b7e6ff04728da21ba5d33.zip
Merge pull request #16550 from eileencodes/remove-unnecessary-to_s-from-add_constraints-method
Remove to_s from reflection.type in add_constraints
Diffstat (limited to 'activerecord/lib')
-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