instance method symbol_unscoping

Ruby on Rails 4.1.16

Since v4.0.13 Last seen in v4.2.9 Private

Available in: v4.0.13 v4.1.16 v4.2.9

Signature

symbol_unscoping(scope)

No documentation comment.

Parameters

scope req
Source
# File activerecord/lib/active_record/relation/query_methods.rb, line 880
    def symbol_unscoping(scope)
      if !VALID_UNSCOPING_VALUES.include?(scope)
        raise ArgumentError, "Called unscope() with invalid unscoping argument ':#{scope}'. Valid arguments are :#{VALID_UNSCOPING_VALUES.to_a.join(", :")}."
      end

      single_val_method = Relation::SINGLE_VALUE_METHODS.include?(scope)
      unscope_code = "#{scope}_value#{'s' unless single_val_method}="

      case scope
      when :order
        self.reverse_order_value = false
        result = []
      else
        result = [] unless single_val_method
      end

      self.send(unscope_code, result)
    end

Defined in activerecord/lib/active_record/relation/query_methods.rb line 880 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::QueryMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close