Class: RailsLiveDashboard::Recorders::ExceptionRecorder
- Inherits:
-
Object
- Object
- RailsLiveDashboard::Recorders::ExceptionRecorder
- Defined in:
- lib/rails_live_dashboard/recorders/exception_recorder.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(exception) ⇒ ExceptionRecorder
constructor
A new instance of ExceptionRecorder.
Constructor Details
#initialize(exception) ⇒ ExceptionRecorder
Returns a new instance of ExceptionRecorder.
4 5 6 |
# File 'lib/rails_live_dashboard/recorders/exception_recorder.rb', line 4 def initialize(exception) @exception = exception end |
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/rails_live_dashboard/recorders/exception_recorder.rb', line 8 def execute Exception.of_class(@exception.class).update_all(should_show: false) Exception.create( batch_id: RailsLiveDashboard::Context.instance.batch_id, content: build_content ) end |