From b00ff22ca00f33c291b3beb2fe3818a2c30bab28 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 3 Jul 2017 21:12:11 +0200 Subject: Fix and test expiration --- lib/active_file/verified_key_with_expiration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/active_file/verified_key_with_expiration.rb b/lib/active_file/verified_key_with_expiration.rb index 601401278b..b475f40f40 100644 --- a/lib/active_file/verified_key_with_expiration.rb +++ b/lib/active_file/verified_key_with_expiration.rb @@ -2,7 +2,7 @@ class ActiveFile::VerifiedKeyWithExpiration class_attribute :verifier, default: defined?(Rails) ? Rails.application.message_verifier('ActiveFile') : nil def self.encode(key, expires_in: nil) - verifier.generate([ key, expires_in ? Time.now.utc.advance(sec: expires_in) : nil ]) + verifier.generate([ key, expires_in ? Time.now.utc.advance(seconds: expires_in) : nil ]) end def self.decode(encoded_key) -- cgit v1.2.3