Exception: Effective::ActionFailed

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, action = nil, subject = nil) ⇒ ActionFailed

Returns a new instance of ActionFailed.



5
6
7
8
9
# File 'app/models/effective/action_failed.rb', line 5

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.



3
4
5
# File 'app/models/effective/action_failed.rb', line 3

def action
  @action
end

#subjectObject (readonly)

Returns the value of attribute subject.



3
4
5
# File 'app/models/effective/action_failed.rb', line 3

def subject
  @subject
end

Instance Method Details

#to_sObject



11
12
13
# File 'app/models/effective/action_failed.rb', line 11

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