only allow users with an invite to create accounts

This commit is contained in:
Adam Cooke
2017-05-12 14:45:42 +01:00
parent 43a5bc4e94
commit e9b03987fe
5 changed files with 27 additions and 16 deletions
+2
View File
@@ -25,6 +25,8 @@ class UserInvite < ApplicationRecord
default_value :expires_at, -> { 7.days.from_now }
scope :active, -> { where("expires_at > ?", Time.now) }
def md5_for_gravatar
@md5_for_gravatar ||= Digest::MD5.hexdigest(email_address.to_s.downcase)
end