Exception: Effective::AccessDenied
- Inherits:
-
StandardError
- Object
- StandardError
- Effective::AccessDenied
- Defined in:
- app/models/effective/access_denied.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
-
#initialize(message = nil, action = nil, subject = nil) ⇒ AccessDenied
constructor
A new instance of AccessDenied.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, action = nil, subject = nil) ⇒ AccessDenied
Returns a new instance of AccessDenied.
6 7 8 9 10 |
# File 'app/models/effective/access_denied.rb', line 6 def initialize( = nil, action = nil, subject = nil) @message = @action = action @subject = subject end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
4 5 6 |
# File 'app/models/effective/access_denied.rb', line 4 def action @action end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
4 5 6 |
# File 'app/models/effective/access_denied.rb', line 4 def subject @subject end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'app/models/effective/access_denied.rb', line 12 def to_s @message || I18n.t(:'unauthorized.default', :default => 'Access Denied') end |