Pass a keyword argument to the serialize method
We were getting the following warning after upgrading to Rails 7.1: ``` Rendered shared/_social_media_meta_tags.html.erb DEPRECATION WARNING: Passing the class as positional argument is deprecated and will be removed in Rails 7.2. Please pass the class as a keyword argument: serialize :metadata, type: Object ```
This commit is contained in:
@@ -3,7 +3,7 @@ class Legislation::Annotation < ApplicationRecord
|
||||
acts_as_paranoid column: :hidden_at
|
||||
include ActsAsParanoidAliases
|
||||
|
||||
serialize :ranges, Array
|
||||
serialize :ranges, type: Array
|
||||
|
||||
belongs_to :draft_version, foreign_key: "legislation_draft_version_id", inverse_of: :annotations
|
||||
belongs_to :author, -> { with_hidden }, class_name: "User", inverse_of: :legislation_annotations
|
||||
|
||||
Reference in New Issue
Block a user