method
where_unscoping
v4.1.8 -
Show latest stable
- Class:
ActiveRecord::QueryMethods
where_unscoping(target_value)private
No documentation available.
# File activerecord/lib/active_record/relation/query_methods.rb, line 898
def where_unscoping(target_value)
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 == target_value
end
end
bind_values.reject! { |col,_| col.name == target_value }
end