Use enum validation instead of ArgumentError rescue for List replies policy check (#34452)

This commit is contained in:
Matt Jankowski 2025-04-14 17:11:10 -04:00 committed by GitHub
commit 2eaef09166
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 6 deletions

View file

@ -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