aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-08-19 16:35:02 +0100
committerLouise Crow <louise.crow@gmail.com>2013-09-16 12:41:45 +0100
commit41427a5857c008f09c62cc53ddbd80de36e4e3c2 (patch)
tree009333abd58c0ac97130729f01debc0df7d96e45 /app/controllers/request_controller.rb
parent8eab413902f58ca3b812f8ecfb73de731b7f244b (diff)
Extract calculation of last update hash
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 9dff180d6..5ca7c431d 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -879,10 +879,9 @@ class RequestController < ApplicationController
:email_subject => _("Log in to download a zip file of {{info_request_title}}",
:info_request_title=>@info_request.title)
)
- updated = Digest::SHA1.hexdigest(@info_request.info_request_events.last.created_at.to_i.to_s + @info_request.updated_at.to_i.to_s)
@url_path = File.join("/download",
request_dirs(@info_request),
- updated,
+ @info_request.last_update_hash,
"#{params[:url_title]}.zip")
file_path = File.expand_path(File.join(download_zip_dir(), @url_path))
if !File.exists?(file_path)