From 180a23924e97703369902d4cad2c5d2c25b8bc0d Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Tue, 21 May 2013 21:10:19 +0100 Subject: [PATCH] Exclude middleware when not in production. --- config/application.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/config/application.rb b/config/application.rb index 868b900..8e2f900 100644 --- a/config/application.rb +++ b/config/application.rb @@ -48,13 +48,15 @@ module DanBarberPhoto # Prefer SASS syntax for stylesheets config.sass.preferred_syntax = :sass - # Heartbeat - config.middleware.insert_before 0, 'Heartbeat' + if Rails.env.production? + # Heartbeat + config.middleware.insert_before 0, 'Heartbeat' - # Rack Middleware - config.middleware.use ::ExceptionNotifier, :email_prefix => "[DanBarberPhoto] ", - :sender_address => %{"Exception Notification" }, - :exception_recipients => %w{dan@danbarberphoto.com} + # Rack Middleware + config.middleware.use ::ExceptionNotifier, :email_prefix => "[DanBarberPhoto] ", + :sender_address => %{"Exception Notification" }, + :exception_recipients => %w{dan@danbarberphoto.com} + end end end