Module: PunditExtra::ResourceAutoload::ClassMethods

Defined in:
lib/pundit_extra/resource_autoload.rb

Instance Method Summary collapse

Instance Method Details

#authorize_resource(options = {}) ⇒ Object



12
13
14
# File 'lib/pundit_extra/resource_autoload.rb', line 12

def authorize_resource(options={})
  before_filter :authorize_resource, options.dup
end

#load_and_authorize_resource(options = {}) ⇒ Object



20
21
22
23
24
25
# File 'lib/pundit_extra/resource_autoload.rb', line 20

def load_and_authorize_resource(options={})
  # :nocov:
  load_resource options
  authorize_resource options
  # :nocov:
end

#load_resource(options = {}) ⇒ Object



8
9
10
# File 'lib/pundit_extra/resource_autoload.rb', line 8

def load_resource(options={})
  before_filter :load_resource, options.dup
end

#skip_authorization(options = {}) ⇒ Object



16
17
18
# File 'lib/pundit_extra/resource_autoload.rb', line 16

def skip_authorization(options={})
  before_filter :skip_authorization_and_scope, options.dup
end