aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-01-13 16:15:20 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-01-13 16:15:20 -0800
commitf1764a2de17bba07bad3ec0d88de152d8279d3bb (patch)
treebd1e766ed6b937405b86d31aff2a29bffc2ad203 /activerecord/lib/active_record
parent1e2d7c2de2d28afbb2d5ee8b656fe7195b17ad74 (diff)
downloadrails-f1764a2de17bba07bad3ec0d88de152d8279d3bb.tar.gz
rails-f1764a2de17bba07bad3ec0d88de152d8279d3bb.tar.bz2
rails-f1764a2de17bba07bad3ec0d88de152d8279d3bb.zip
unscope should remove bind values associated with the where
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
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)