add token_expired to confirmation

parent 7f1f8cc9
Pipeline #1021 canceled with stages
in 0 seconds
...@@ -13,6 +13,10 @@ class Confirmation < ApplicationRecord ...@@ -13,6 +13,10 @@ class Confirmation < ApplicationRecord
Digest::SHA1.hexdigest(token.to_s) Digest::SHA1.hexdigest(token.to_s)
end end
def token_expired?
updated_at <= 24.hours.ago
end
private private
def create_confirm_token def create_confirm_token
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment