1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

feat: add settings page (#274)

* feat: add settings page

* feat: add updating family name

* fix: formatting

* refactor: update to use Rails label helper
This commit is contained in:
Edrick Leong 2024-02-05 22:19:23 +08:00 committed by GitHub
parent f6251407e9
commit 622fc07a76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 69 additions and 0 deletions

View file

@ -2,6 +2,7 @@ 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 }