Exception: Effective::AccessDenied

Inherits:
StandardError
  • Object
show all
Defined in:
app/models/effective/access_denied.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(message = nil, action = nil, subject = nil)
  @message = message
  @action = action
  @subject = subject
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



4
5
6
# File 'app/models/effective/access_denied.rb', line 4

def action
  @action
end

#subjectObject (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_sObject



12
13
14
# File 'app/models/effective/access_denied.rb', line 12

def to_s
  @message || I18n.t(:'unauthorized.default', :default => 'Access Denied')
end