diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-13 16:15:20 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-13 16:15:20 -0800 |
commit | f1764a2de17bba07bad3ec0d88de152d8279d3bb (patch) | |
tree | bd1e766ed6b937405b86d31aff2a29bffc2ad203 /activerecord/lib | |
parent | 1e2d7c2de2d28afbb2d5ee8b656fe7195b17ad74 (diff) | |
download | rails-f1764a2de17bba07bad3ec0d88de152d8279d3bb.tar.gz rails-f1764a2de17bba07bad3ec0d88de152d8279d3bb.tar.bz2 rails-f1764a2de17bba07bad3ec0d88de152d8279d3bb.zip |
unscope should remove bind values associated with the where
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 827d108fd7..979216bee7 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -880,6 +880,8 @@ module ActiveRecord raise "unscope(where: #{target_value.inspect}) failed: unscoping #{rel.class} is unimplemented." end end + + bind_values.reject! { |col,_| col.name == target_value } end def custom_join_ast(table, joins) |