From 53304df74010f457d9fe246ee32b00f4d10bc504 Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Tue, 24 Jan 2012 15:42:39 -0800 Subject: [PATCH] I can't test this at this momement. I will put it back in once i have a chance to test it first Revert "finally found a way to disable airbrake [ci skip]" This reverts commit 8aafd56482c734d849910c7bb51c87e77aac5efa. --- config/initializers/airbrake.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/config/initializers/airbrake.rb b/config/initializers/airbrake.rb index 5d7a680f8..920032308 100644 --- a/config/initializers/airbrake.rb +++ b/config/initializers/airbrake.rb @@ -2,11 +2,10 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. -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 +if AppConfig[:airbrake_api_key].present? + require 'airbrake' + Airbrake.configure do |config| + puts AppConfig[:airbrake_api_key] + config.api_key = AppConfig[:airbrake_api_key] end -end +end \ No newline at end of file