diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-12-13 20:39:33 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-12-13 20:39:33 +0000 |
commit | b446bbee9d936f3f5424f4c79b34577416a68f7f (patch) | |
tree | 20dcd9a64554816fdb4765be7a776592aa926814 /app/controllers/application_controller.rb | |
parent | fed1571d319023d93287c98b1a155cbd75aec8b6 (diff) | |
parent | a5744b206cf1ca811f913d68cafc0178079be2f7 (diff) |
Merge branch 'hotfix/authenticate-and-expire-download-zips' into wdtk
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f9649c868..3c94e1b47 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] |