diff options
author | seb <seb@seb-U36JC> | 2011-11-21 12:13:18 +0000 |
---|---|---|
committer | seb <seb@seb-U36JC> | 2011-11-21 12:13:18 +0000 |
commit | 8ed974e499c842a8e46d15fd5e492828550b0423 (patch) | |
tree | b89c3e2d59c0b0d24a6ab7ec83eecdf4bfd170ed /app/controllers/request_controller.rb | |
parent | 2e299c5e5e67b4448bbc42abe0a658f3fa8f7d81 (diff) |
Fix occasional test failures due to two events happening in the same second being treated as one for the purposes of caching. Fixes #290.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 4b7884065..1801648ca 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -774,7 +774,7 @@ class RequestController < ApplicationController :email => _("Then you can download a zip file of {{info_request_title}}.",:info_request_title=>info_request.title), :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.get_last_event.created_at.to_s + info_request.updated_at.to_s) + updated = Digest::SHA1.hexdigest(info_request.get_last_event.created_at.to_i.to_s + info_request.updated_at.to_i.to_s) @url_path = "/download/#{updated[0..1]}/#{updated}/#{params[:url_title]}.zip" file_path = File.join(File.dirname(__FILE__), '../../cache/zips', @url_path) if !File.exists?(file_path) |