method
where_unscoping
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::QueryMethods
where_unscoping(target_value)private
No documentation available.
# File activerecord/lib/active_record/relation/query_methods.rb, line 847
def where_unscoping(target_value)
target_value_sym = target_value.to_sym
where_values.reject! do |rel|
case rel
when Arel::Nodes::In, Arel::Nodes::Equality
subrelation = (rel.left.kind_of?(Arel::Attributes::Attribute) ? rel.left : rel.right)
subrelation.name.to_sym == target_value_sym
else
raise "unscope(where: #{target_value.inspect}) failed: unscoping #{rel.class} is unimplemented."
end
end
end