module Doodoo::NestedLoadAndAuthorize
Public Instance Methods
load_resource(name, options={}, &block)
click to toggle source
syntactic sugar for adding the :skip_authorize option
# File lib/doodoo/nested_load_and_authorize.rb, line 77 def load_resource(name, options={}, &block) options[:skip_authorize] = true load_and_authorize(name, options, &block) end
loaded_resources()
click to toggle source
An array of the resources loaded by load_and_authorize
. This may be useful for constructing breadcrumbs or for views to determine what context they are being rendered in.
# File lib/doodoo/nested_load_and_authorize.rb, line 15 def loaded_resources @_loaded_resources ||= [] end