lib/code_buddy/middleware.rb in code_buddy-0.0.1 vs lib/code_buddy/middleware.rb in code_buddy-0.0.2

- old
+ new

@@ -7,10 +7,12 @@ if rails_loaded module CodeBuddy class Railtie < Rails::Railtie initializer "code_buddy.add_middleware" do |app| - app.middleware.swap ActionDispatch::ShowExceptions, CodeBuddy::ShowExceptions + if app.config.action_dispatch.show_exceptions + app.middleware.swap ActionDispatch::ShowExceptions, CodeBuddy::ShowExceptions + end end end class ShowExceptions < ActionDispatch::ShowExceptions