Autofix Rubocop Rails/EnumHash (#23737)
This commit is contained in:
parent
44a7d87cb1
commit
63e6353886
10 changed files with 12 additions and 28 deletions
|
@ -14,7 +14,7 @@
|
|||
class Relay < ApplicationRecord
|
||||
validates :inbox_url, presence: true, uniqueness: true, url: true, if: :will_save_change_to_inbox_url?
|
||||
|
||||
enum state: [:idle, :pending, :accepted, :rejected]
|
||||
enum state: { idle: 0, pending: 1, accepted: 2, rejected: 3 }
|
||||
|
||||
scope :enabled, -> { accepted }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue