Class: RailsErrorDashboard::Commands::UnmuteError
- Inherits:
-
Object
- Object
- RailsErrorDashboard::Commands::UnmuteError
- Defined in:
- lib/rails_error_dashboard/commands/unmute_error.rb
Overview
Command: Unmute notifications for an error Restores normal notification behavior for the error.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(error_id) ⇒ UnmuteError
constructor
A new instance of UnmuteError.
Constructor Details
#initialize(error_id) ⇒ UnmuteError
Returns a new instance of UnmuteError.
12 13 14 |
# File 'lib/rails_error_dashboard/commands/unmute_error.rb', line 12 def initialize(error_id) @error_id = error_id end |
Class Method Details
.call(error_id) ⇒ Object
8 9 10 |
# File 'lib/rails_error_dashboard/commands/unmute_error.rb', line 8 def self.call(error_id) new(error_id).call end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rails_error_dashboard/commands/unmute_error.rb', line 16 def call error = ErrorLog.find(@error_id) error.update!( muted: false, muted_at: nil, muted_by: nil, muted_reason: nil ) PluginRegistry.dispatch(:on_error_unmuted, error) error end |