Class: ActionController::Base
- Inherits:
-
Object
- Object
- ActionController::Base
- Defined in:
- lib/can_do.rb
Instance Method Summary collapse
- #can?(*args, &block) ⇒ Boolean
- #deny_permission(reason, *args) ⇒ Object
- #require_permission!(*args) ⇒ Object
Instance Method Details
#can?(*args, &block) ⇒ Boolean
22 23 24 |
# File 'lib/can_do.rb', line 22 def can?(*args, &block) CanDo.can?(*args, &block) end |
#deny_permission(reason, *args) ⇒ Object
34 35 36 |
# File 'lib/can_do.rb', line 34 def (reason, *args) raise CanDo::PermissionError.new(reason) end |