aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2013-02-20 11:58:48 +1100
committerHenare Degan <henare.degan@gmail.com>2013-02-20 12:23:55 +1100
commit7f93d7f1d486f55f6ebe9da37150d16b1a4fa634 (patch)
tree7a81d926f9f0d222573ca37de17d2297a4218ed8
parentd2888c4bfce13dc60f7c54de2f68228f6c664107 (diff)
Remove deprecated constants - #589
-rw-r--r--app/controllers/request_controller.rb2
-rw-r--r--app/models/info_request.rb2
-rw-r--r--app/models/raw_email.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 162060d9b..3bd032c3d 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -17,7 +17,7 @@ class RequestController < ApplicationController
@@custom_states_loaded = false
begin
- if ENV["RAILS_ENV"] != "test"
+ if !Rails.env.test?
require 'customstates'
include RequestControllerCustomStates
@@custom_states_loaded = true
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 9d8fc29fd..375d972a3 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -152,7 +152,7 @@ class InfoRequest < ActiveRecord::Base
@@custom_states_loaded = false
begin
- if ENV["RAILS_ENV"] != "test"
+ if !Rails.env.test?
require 'customstates'
include InfoRequestCustomStates
@@custom_states_loaded = true
diff --git a/app/models/raw_email.rb b/app/models/raw_email.rb
index de7978b82..77705b0f6 100644
--- a/app/models/raw_email.rb
+++ b/app/models/raw_email.rb
@@ -23,7 +23,7 @@ class RawEmail < ActiveRecord::Base
raise "Failed to find the id number of the associated request: has it been saved?"
end
- if ENV["RAILS_ENV"] == "test"
+ if Rails.env.test?
return File.join(Rails.root, 'files/raw_email_test')
else
return File.join(Configuration::raw_emails_location,