aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-07-13 16:24:01 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-07-13 16:24:01 +0100
commit0665b99d6e1c75ea1c4227f79d10f8fc5ab41f6b (patch)
tree20d5e971ad6b21050e1604b3dadf26f5460ec635 /app/models/info_request.rb
parenta498a503e840c6c7084234f01f6cf61459e7234e (diff)
Fix bug that meant plugin custom states weren't being loaded
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb4
1 files changed, 2 insertions, 2 deletions
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