diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-04-03 02:53:27 -0700 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-04-03 02:53:27 -0700 |
commit | a33c560ab2a3a6c1090dc0334b85c46b9f45c107 (patch) | |
tree | 50a47ab216c97667548be236b6a7f928bc535b5a /app | |
parent | 9ed1991310977986053ee11e3d13b487d6364d3c (diff) | |
parent | 74d74416d145a49c04f62ec9659f1a564251c1b6 (diff) |
Merge pull request #464 from jpmckinney/small-fixes
Small fixes
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/application_controller.rb | 2 | ||||
-rw-r--r-- | app/models/raw_email.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0508abe76..0ec8e206e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -178,7 +178,7 @@ class ApplicationController < ActionController::Base end def foi_fragment_cache_path(param) - path = File.join(RAILS_ROOT, 'cache', 'views', foi_fragment_cache_part_path(param)) + path = File.join(Rails.root, 'cache', 'views', foi_fragment_cache_part_path(param)) max_file_length = 255 - 35 # we subtract 35 because tempfile # adds on a variable number of # characters diff --git a/app/models/raw_email.rb b/app/models/raw_email.rb index 3e12a6feb..1feb9c70b 100644 --- a/app/models/raw_email.rb +++ b/app/models/raw_email.rb @@ -27,7 +27,7 @@ class RawEmail < ActiveRecord::Base def directory request_id = self.incoming_message.info_request.id.to_s if ENV["RAILS_ENV"] == "test" - return File.join(RAILS_ROOT, 'files/raw_email_test') + return File.join(Rails.root, 'files/raw_email_test') else return File.join(MySociety::Config.get('RAW_EMAILS_LOCATION', 'files/raw_emails'), |