aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-01-13 15:08:06 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-01-13 15:11:19 -0800
commit492bad71f384c71e7e2708d6733d69f478657613 (patch)
treeba1b896a5105901ca0c2e522c417d66274bbb38d /activerecord/lib
parent7e02effa7a750de93472e97bef675d4683c553b4 (diff)
downloadrails-492bad71f384c71e7e2708d6733d69f478657613.tar.gz
rails-492bad71f384c71e7e2708d6733d69f478657613.tar.bz2
rails-492bad71f384c71e7e2708d6733d69f478657613.zip
no need to to_sym
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 78da6a83ec..b6fd75e72b 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -869,13 +869,13 @@ module ActiveRecord
end
def where_unscoping(target_value)
- target_value_sym = target_value.to_sym
+ target_value = target_value.to_s
where_values.reject! do |rel|
case rel
when Arel::Nodes::In, Arel::Nodes::NotIn, Arel::Nodes::Equality, Arel::Nodes::NotEqual
subrelation = (rel.left.kind_of?(Arel::Attributes::Attribute) ? rel.left : rel.right)
- subrelation.name.to_sym == target_value_sym
+ subrelation.name == target_value
else
raise "unscope(where: #{target_value.inspect}) failed: unscoping #{rel.class} is unimplemented."
end