Permalink
Browse files

no need to to_sym

  • Loading branch information...
1 parent 7e02eff commit 492bad71f384c71e7e2708d6733d69f478657613 @tenderlove tenderlove committed Jan 13, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/relation/query_methods.rb
View
4 activerecord/lib/active_record/relation/query_methods.rb
@@ -869,13 +869,13 @@ def symbol_unscoping(scope)
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

0 comments on commit 492bad7

Please sign in to comment.