1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

Add new settings profile and preferences pages (#672)

* Add new settings profile and preferences pages

* Fix lint errors
This commit is contained in:
Zach Gollwitzer 2024-04-25 07:54:56 -04:00 committed by GitHub
parent ad4de99f1a
commit 5a5f13b46b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 192 additions and 32 deletions

View file

@ -7,6 +7,8 @@ class User < ApplicationRecord
validates :email, presence: true, uniqueness: true
normalizes :email, with: ->(email) { email.strip.downcase }
enum :role, { member: "member", admin: "admin" }, validate: true
generates_token_for :password_reset, expires_in: 15.minutes do
password_salt&.last(10)
end