From 63acd42f410ee7b4a70409feb0f6c23459831edb Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Mon, 18 Dec 2023 13:01:04 +0100 Subject: [PATCH] Declare serialize coder Required for Rails 7.1. REDMINE-20487 --- app/models/pageflow/linkmap_page/color_map_file.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/pageflow/linkmap_page/color_map_file.rb b/app/models/pageflow/linkmap_page/color_map_file.rb index 49d3391..001e240 100644 --- a/app/models/pageflow/linkmap_page/color_map_file.rb +++ b/app/models/pageflow/linkmap_page/color_map_file.rb @@ -46,7 +46,11 @@ class ColorMapFile < GeneratedImageFile do_not_validate_attachment_file_type :attachment - serialize :attachment_colors + if ActiveRecord.version >= Gem::Version.new('7.1') + serialize :attachment_colors, type: Object, coder: YAML + else + serialize :attachment_colors + end def sprite_url attachment.url(:sprite)