Module: Heimdallr::Resource::ClassMethods

Defined in:
lib/heimdallr/resource.rb

Instance Method Summary collapse

Instance Method Details

#load_and_authorize_resource(options = {}) ⇒ Object



12
13
14
# File 'lib/heimdallr/resource.rb', line 12

def load_and_authorize_resource(options = {})
  Heimdallr::ResourceImplementation.add_before_filter self, :load_and_authorize_resource, options
end

#load_resource(options = {}) ⇒ Object



8
9
10
# File 'lib/heimdallr/resource.rb', line 8

def load_resource(options = {})
  Heimdallr::ResourceImplementation.add_before_filter self, :load_resource, options
end

#skip_authorization_check(options = {}) ⇒ Object



16
17
18
19
20
# File 'lib/heimdallr/resource.rb', line 16

def skip_authorization_check(options = {})
  prepend_before_filter options do |controller|
    controller.instance_variable_set :@_skip_authorization_check, true
  end
end