0
0
Fork 0

Update enum syntax to use the new Rails 7.0 style (#29217)

This commit is contained in:
Wolfgang Fournès 2024-02-16 15:54:23 +01:00 committed by GitHub
parent 1d9d14b8de
commit cfadb87077
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 20 additions and 20 deletions

View file

@ -47,8 +47,8 @@ class PreviewCard < ApplicationRecord
self.inheritance_column = false
enum type: { link: 0, photo: 1, video: 2, rich: 3 }
enum link_type: { unknown: 0, article: 1 }
enum :type, { link: 0, photo: 1, video: 2, rich: 3 }
enum :link_type, { unknown: 0, article: 1 }
has_many :preview_cards_statuses, dependent: :delete_all, inverse_of: :preview_card
has_many :statuses, through: :preview_cards_statuses