Add spanish locales and gravatar options
This commit is contained in:
@@ -6,6 +6,7 @@ class User
|
||||
property :name
|
||||
property :active_list_id
|
||||
property :admin, type: :boolean, default: false
|
||||
property :email_sha256
|
||||
|
||||
#FACEBOOK
|
||||
property :provider
|
||||
@@ -26,6 +27,7 @@ class User
|
||||
|
||||
validates_uniqueness_of :email
|
||||
before_save :ensure_authentication_token
|
||||
before_create :set_email_sha256
|
||||
|
||||
#has_many :error_logs
|
||||
has_many :user_feedbacks
|
||||
@@ -150,6 +152,10 @@ class User
|
||||
reset_authentication_token! if authentication_token.blank?
|
||||
end
|
||||
|
||||
def set_email_sha256
|
||||
self.email_sha256 = Digest::SHA256.hexdigest email.to_s.strip.downcase
|
||||
end
|
||||
|
||||
def self.authentication_token
|
||||
SecureRandom.hex(24)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user