mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 07:39:39 +02:00
Initial commit
This commit is contained in:
commit
99de24ac70
147 changed files with 3519 additions and 0 deletions
12
app/models/user.rb
Normal file
12
app/models/user.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
class User < ApplicationRecord
|
||||
has_secure_password
|
||||
|
||||
belongs_to :family
|
||||
|
||||
validates :email, presence: true, uniqueness: true
|
||||
normalizes :email, with: -> (email) { email.strip.downcase }
|
||||
|
||||
generates_token_for :password_reset, expires_in: 15.minutes do
|
||||
password_salt&.last(10)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue