Use enum validation instead of ArgumentError rescue for List replies policy check (#34452)
This commit is contained in:
parent
5991caae87
commit
2eaef09166
3 changed files with 5 additions and 6 deletions
|
|
@ -18,7 +18,7 @@ class List < ApplicationRecord
|
|||
|
||||
PER_ACCOUNT_LIMIT = 50
|
||||
|
||||
enum :replies_policy, { list: 0, followed: 1, none: 2 }, prefix: :show
|
||||
enum :replies_policy, { list: 0, followed: 1, none: 2 }, prefix: :show, validate: true
|
||||
|
||||
belongs_to :account
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue