Update enum syntax to use the new Rails 7.0 style (#29217)
This commit is contained in:
parent
1d9d14b8de
commit
cfadb87077
15 changed files with 20 additions and 20 deletions
|
@ -85,8 +85,8 @@ class Account < ApplicationRecord
|
|||
include DomainNormalizable
|
||||
include Paginable
|
||||
|
||||
enum protocol: { ostatus: 0, activitypub: 1 }
|
||||
enum suspension_origin: { local: 0, remote: 1 }, _prefix: true
|
||||
enum :protocol, { ostatus: 0, activitypub: 1 }
|
||||
enum :suspension_origin, { local: 0, remote: 1 }, prefix: true
|
||||
|
||||
validates :username, presence: true
|
||||
validates_with UniqueUsernameValidator, if: -> { will_save_change_to_username? }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue