Compare commits

...

2 Commits

Author SHA1 Message Date
Matt Jankowski
4a0e01d621
Merge 381a2a6ceb into c442589593 2025-07-10 08:06:41 +00:00
Matt Jankowski
381a2a6ceb Move stray association declaration back with its friends 2025-07-08 10:52:25 -04:00

View File

@ -91,6 +91,7 @@ class User < ApplicationRecord
has_many :backups, inverse_of: :user, dependent: nil has_many :backups, inverse_of: :user, dependent: nil
has_many :invites, inverse_of: :user, dependent: nil has_many :invites, inverse_of: :user, dependent: nil
has_many :markers, inverse_of: :user, dependent: :destroy has_many :markers, inverse_of: :user, dependent: :destroy
has_many :session_activations, dependent: :destroy
has_many :webauthn_credentials, dependent: :destroy has_many :webauthn_credentials, dependent: :destroy
has_many :ips, class_name: 'UserIp', inverse_of: :user, dependent: nil has_many :ips, class_name: 'UserIp', inverse_of: :user, dependent: nil
@ -137,8 +138,6 @@ class User < ApplicationRecord
normalizes :time_zone, with: ->(time_zone) { ActiveSupport::TimeZone[time_zone].nil? ? nil : time_zone } normalizes :time_zone, with: ->(time_zone) { ActiveSupport::TimeZone[time_zone].nil? ? nil : time_zone }
normalizes :chosen_languages, with: ->(chosen_languages) { chosen_languages.compact_blank.presence } normalizes :chosen_languages, with: ->(chosen_languages) { chosen_languages.compact_blank.presence }
has_many :session_activations, dependent: :destroy
delegate :can?, to: :role delegate :can?, to: :role
attr_reader :invite_code, :date_of_birth attr_reader :invite_code, :date_of_birth