class RequiredScopes::Errors::BaseScopeNotSatisfiedError

Raised if you try to execute an operation on a model or relation without having satisfied the base scope. (We use this instead of RequiredScopeCategoriesNotSatisfiedError, above, simply to make the error message simpler and more comprehensible to users who only are using the “base scope” syntactic sugar.)

Public Class Methods

new(model_class, current_relation, triggering_method) click to toggle source
# File lib/required_scopes/errors.rb, line 36
def initialize(model_class, current_relation, triggering_method)
  super(model_class, current_relation, triggering_method, [ :base ], [ ])
end

Private Instance Methods

build_message() click to toggle source
# File lib/required_scopes/errors.rb, line 41
      def build_message
        %{Model #{model_class.name} requires specification of a base scope before using it in a query
or other such operation. (Base scopes are those declared with #base_scope rather than just #scope,
or class methods that include #base_scope_satisfied.)}
      end