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
|
@ -15,7 +15,7 @@
|
|||
class Relay < ApplicationRecord
|
||||
validates :inbox_url, presence: true, uniqueness: true, url: true, if: :will_save_change_to_inbox_url?
|
||||
|
||||
enum state: { idle: 0, pending: 1, accepted: 2, rejected: 3 }
|
||||
enum :state, { idle: 0, pending: 1, accepted: 2, rejected: 3 }
|
||||
|
||||
scope :enabled, -> { accepted }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue