Exception: Cornerstone::AccessDenied
- Inherits:
-
StandardError
- Object
- StandardError
- Cornerstone::AccessDenied
- Defined in:
- lib/cornerstone/exceptions.rb
Instance Attribute Summary collapse
-
#default_message ⇒ Object
writeonly
Sets the attribute default_message.
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ AccessDenied
constructor
A new instance of AccessDenied.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil) ⇒ AccessDenied
Returns a new instance of AccessDenied.
6 7 8 9 |
# File 'lib/cornerstone/exceptions.rb', line 6 def initialize( = nil) @message = @default_message = I18n.t(:"unauthorized.default", :default => "You are not authorized to access this page.") end |
Instance Attribute Details
#default_message=(value) ⇒ Object (writeonly)
Sets the attribute default_message
4 5 6 |
# File 'lib/cornerstone/exceptions.rb', line 4 def (value) @default_message = value end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/cornerstone/exceptions.rb', line 11 def to_s @message || @default_message end |