Autofix Rubocop Rails/EnumHash (#23737)
This commit is contained in:
parent
44a7d87cb1
commit
63e6353886
10 changed files with 12 additions and 28 deletions
|
@ -44,8 +44,8 @@ class PreviewCard < ApplicationRecord
|
|||
|
||||
self.inheritance_column = false
|
||||
|
||||
enum type: [:link, :photo, :video, :rich]
|
||||
enum link_type: [:unknown, :article]
|
||||
enum type: { link: 0, photo: 1, video: 2, rich: 3 }
|
||||
enum link_type: { unknown: 0, article: 1 }
|
||||
|
||||
has_and_belongs_to_many :statuses
|
||||
has_one :trend, class_name: 'PreviewCardTrend', inverse_of: :preview_card, dependent: :destroy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue