aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/request_controller.rb3
-rw-r--r--app/models/info_request.rb4
2 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 44e4880c2..441ddc417 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -14,7 +14,8 @@ class RequestController < ApplicationController
@@custom_states_loaded = false
begin
- if !ENV["RAILS_ENV"] == "test"
+ if ENV["RAILS_ENV"] != "test"
+ require 'customstates'
include RequestControllerCustomStates
@@custom_states_loaded = true
end
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index f7a8f58a2..dcef9e5b5 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -94,7 +94,6 @@ class InfoRequest < ActiveRecord::Base
'requires_admin',
'user_withdrawn'
]
-
if @@custom_states_loaded
states += InfoRequest.theme_extra_states
end
@@ -108,7 +107,8 @@ class InfoRequest < ActiveRecord::Base
@@custom_states_loaded = false
begin
- if !ENV["RAILS_ENV"] == "test"
+ if ENV["RAILS_ENV"] != "test"
+ require 'customstates'
include InfoRequestCustomStates
@@custom_states_loaded = true
end