Class: ActiveError::Fault
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ActiveError::Fault
- Defined in:
- app/models/active_error/fault.rb
Instance Method Summary collapse
- #exception ⇒ Object
- #occurrences ⇒ Object
- #template ⇒ Object
- #template=(new_template) ⇒ Object
- #title ⇒ Object
Instance Method Details
#exception ⇒ Object
22 23 24 |
# File 'app/models/active_error/fault.rb', line 22 def exception ExceptionMock.make(fault: self) end |
#occurrences ⇒ Object
30 31 32 |
# File 'app/models/active_error/fault.rb', line 30 def occurrences "#{instances_count} #{'instance'.pluralize(instances_count)}" end |
#template ⇒ Object
34 35 36 |
# File 'app/models/active_error/fault.rb', line 34 def template Marshal.load(super) unless super.nil? # rubocop:disable Security/MarshalLoad end |
#template=(new_template) ⇒ Object
38 39 40 |
# File 'app/models/active_error/fault.rb', line 38 def template=(new_template) super(Marshal.dump(new_template)) end |
#title ⇒ Object
26 27 28 |
# File 'app/models/active_error/fault.rb', line 26 def title "#{klass}#{controller_display}#{action_display}" end |