diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-18 21:09:28 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-18 21:09:28 -0300 |
commit | 57cf426e614be55c167b7e6ff04728da21ba5d33 (patch) | |
tree | 8af3d3d4ffaddac33e252222392b5db0fc16783d | |
parent | 6956dfcaa2733948337f1074057221e7ab85f3b4 (diff) | |
parent | 0e0e0db416fc193766f0b21d61fc8f9dfadfe95e (diff) | |
download | rails-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
-rw-r--r-- | activerecord/lib/active_record/associations/association_scope.rb | 4 |
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 |