-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable in production when running under rails
- Loading branch information
Charlie Somerville
committed
Dec 9, 2012
1 parent
823b408
commit f436b04
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
module BetterErrors | ||
class Railtie < Rails::Railtie | ||
initializer "better_errors.configure_rails_initialization" do | ||
middleware = Rails.application.middleware | ||
middleware.use BetterErrors::Middleware | ||
|
||
BetterErrors.application_root = Rails.root.to_s | ||
unless Rails.env.production? | ||
Rails.application.middleware.use BetterErrors::Middleware | ||
BetterErrors.application_root = Rails.root.to_s | ||
end | ||
end | ||
end | ||
end |
f436b04
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to use the
consider_all_requests_local
environment flag to enable/disable this, the same way the current exception page works? e.g. in config/environments/development.rb: