module Protector::InheritedResources::ClassMethods

Public Instance Methods

effective_protector_subject() click to toggle source
# File lib/protector/inherited_resources/class_methods.rb, line 8
def effective_protector_subject
  return @protector_subject unless @protector_subject.nil?
  
  if superclass.respond_to? :effective_protector_subject
    superclass.effective_protector_subject
  else
    :current_user
  end
end
protector_subject(subject) click to toggle source
# File lib/protector/inherited_resources/class_methods.rb, line 3
def protector_subject(subject)
  subject = false if subject.nil?
  @protector_subject = subject
end