-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
solid_errors/lib/solid_errors/engine.rb
Lines 15 to 17 in b75251b
| initializer "solid_errors.active_record.error_subscriber" do | |
| Rails.error.subscribe(SolidErrors::Subscriber.new) | |
| end |
This line works on every RAILS_ENV.
I wrote ugly workaround on my config/environments/test.rb
config.after_initialize do
Rails.error.unsubscribe(SolidErrors::Subscriber)
endWhich solution would be better?
- Hard cord:
Rails.error.subscribe(SolidErrors::Subscriber.new) unless Rails.env.test? - Supply
config.rails_error_subscriber(default to true?) - Supply
config.rails_error_subscribe_envs(default to["production"]?) - Add unsubscribe document on
README
Metadata
Metadata
Assignees
Labels
No labels