Module: RouteAuthorizer::PermissionDSL
- Extended by:
- ActiveSupport::Concern
- Included in:
- Permission
- Defined in:
- lib/route_authorizer/permission_dsl.rb
Instance Method Summary collapse
Instance Method Details
#permit(controller, options = {}) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/route_authorizer/permission_dsl.rb', line 25 def permit(controller, = {}) actions = [:only] || [:all] actions.each do |action| instance_variable_get(@current_role) << [controller, action] end end |
#permit_all ⇒ Object
21 22 23 |
# File 'lib/route_authorizer/permission_dsl.rb', line 21 def permit_all instance_variable_get(@current_role) << [:all] end |