module RequiredScopes::ActiveRecord::Base
This is the module that gets +include+d into ::ActiveRecord::Base when required_scopes
is loaded. It defines the exposed methods on ::ActiveRecord::Base, and overrides a few (like scope and unscoped).
Public Instance Methods
relation_for_destroy()
click to toggle source
Calling destroy ends up generating a relation, via this method, that is used to destroy the object. We need to make sure we don’t trigger any checks on this call.
Calls superclass method
# File lib/required_scopes/active_record/base.rb, line 20 def relation_for_destroy out = super out.all_scope_categories_satisfied! out end