From 63616c5cedb442896989a00c9e20afc67a0b51d5 Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Thu, 19 Apr 2012 21:02:29 -0700 Subject: [PATCH] trying this on for size again; Revert "I can't test this at this momement. I will put it back in once i have a" This reverts commit 53304df74010f457d9fe246ee32b00f4d10bc504. Conflicts: config/initializers/airbrake.rb --- config/initializers/airbrake.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/config/initializers/airbrake.rb b/config/initializers/airbrake.rb index f90629be0..5d7a680f8 100644 --- a/config/initializers/airbrake.rb +++ b/config/initializers/airbrake.rb @@ -2,9 +2,11 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. -if AppConfig[:airbrake_api_key].present? - require 'airbrake' - Airbrake.configure do |config| - config.api_key = AppConfig[:airbrake_api_key] +Airbrake.configure do |config| + if AppConfig[:airbrake_api_key].present? + config.api_key = AppConfig[:airbrake_api_key] + else + # creative way to disable Airbrake, should be replaced once the gem provides a proper way + config.development_environments << Rails.env end -end \ No newline at end of file +end