method

where_unscoping

Importance_0
v4.2.7 - Show latest stable - 0 notes - Class: ActiveRecord::QueryMethods
where_unscoping(target_value) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/query_methods.rb, line 907
    def where_unscoping(target_value)
      target_value = target_value.to_s

      self.where_values = where_values.reject do |rel|
        case rel
        when Arel::Nodes::Between, Arel::Nodes::In, Arel::Nodes::NotIn, Arel::Nodes::Equality, Arel::Nodes::NotEqual, Arel::Nodes::LessThan, Arel::Nodes::LessThanOrEqual, Arel::Nodes::GreaterThan, Arel::Nodes::GreaterThanOrEqual
          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
Register or log in to add new notes.