aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-04 16:22:24 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-04 16:22:40 +1100
commit58defe7a49eda51676ffaa34ccf2b267d0e62159 (patch)
treef510d276e31f86abecab98d44282e1521c6916a0 /app/controllers/application_controller.rb
parentc9c599daacc54dcba508fa5868e3aef928b5670d (diff)
parent185c09f98dc670881239ecd230e47fb2f214e53b (diff)
Merge remote-tracking branch 'mysociety/develop' into rails-3-spike
Conflicts: Gemfile.lock Rakefile app/controllers/request_controller.rb lib/tasks/rspec.rake spec/controllers/services_controller_spec.rb spec/spec_helper.rb spec/views/request/_after_actions.rhtml_spec.rb
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 3206df1d2..9b39d5178 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -226,6 +226,19 @@ class ApplicationController < ActionController::Base
end
end
+ def request_dirs(info_request)
+ first_three_digits = info_request.id.to_s()[0..2]
+ File.join(first_three_digits.to_s, info_request.id.to_s)
+ end
+
+ def request_download_zip_dir(info_request)
+ File.join(download_zip_dir, "download", request_dirs(info_request))
+ end
+
+ def download_zip_dir()
+ File.join(Rails.root, '/cache/zips/')
+ end
+
# get the local locale
def locale_from_params(*args)
if params[:show_locale]