mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
* feat: add settings page * feat: add updating family name * fix: formatting * refactor: update to use Rails label helper
13 lines
335 B
Ruby
13 lines
335 B
Ruby
class User < ApplicationRecord
|
|
has_secure_password
|
|
|
|
belongs_to :family
|
|
accepts_nested_attributes_for :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
|