Merge pull request #65 from yep/master.

increased invite link lifetime from 2 days to 7 days.
This commit is contained in:
bennibu 2011-05-02 07:36:24 -07:00
commit dc1d545829

View file

@ -28,7 +28,7 @@ class Invite < ActiveRecord::Base
# Before validation, set token and expires_at. # Before validation, set token and expires_at.
def before_validation def before_validation
self.token = Digest::SHA1.hexdigest(Time.now.to_s + rand(100).to_s) self.token = Digest::SHA1.hexdigest(Time.now.to_s + rand(100).to_s)
self.expires_at = Time.now.advance(:days => 2) self.expires_at = Time.now.advance(:days => 7)
end end
# Sends an email to the invited user. # Sends an email to the invited user.