mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 09:51:24 +00:00
Move stray association declaration back with its friends
This commit is contained in:
parent
14cb5ff881
commit
f65e582da5
|
@ -85,6 +85,7 @@ class User < ApplicationRecord
|
||||||
has_many :invites, inverse_of: :user, dependent: nil
|
has_many :invites, inverse_of: :user, dependent: nil
|
||||||
has_many :login_activities, inverse_of: :user, dependent: :destroy
|
has_many :login_activities, inverse_of: :user, dependent: :destroy
|
||||||
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
|
||||||
|
|
||||||
|
@ -127,8 +128,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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user