aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/environments/development.rb7
-rw-r--r--config/routes.rb4
2 files changed, 11 insertions, 0 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 24a4ed6b8..925718e69 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -95,4 +95,11 @@ Rails.application.configure do
config.i18n.available_locales = [:fr, :en]
config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload) if ENV['LIVERELOAD']
+ config.development_toolbar = false
+ if ENV['TOOLBAR'] && File.exists?("config/development_toolbar.rb")
+ config.development_toolbar = OpenStruct.new
+ config.development_toolbar.tap do |toolbar|
+ eval File.read("config/development_toolbar.rb")
+ end
+ end
end
diff --git a/config/routes.rb b/config/routes.rb
index 0f60733af..432423ac5 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -238,6 +238,10 @@ ChouetteIhm::Application.routes.draw do
get '/help/(*slug)' => 'help#show'
+ if Rails.application.config.development_toolbar
+ post "/development_toolbar" => "development_toolbar#update_settings", as: :development_toolbar_update_settings
+ end
+
match '/404', to: 'errors#not_found', via: :all, as: 'not_found'
match '/403', to: 'errors#forbidden', via: :all, as: 'forbidden'
match '/422', to: 'errors#server_error', via: :all, as: 'unprocessable_entity'