From a6b5f2f56d00efef7c8bdbe451db2655731f5ae6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 6 Oct 2023 22:18:30 +0100 Subject: [PATCH 1/1] Adjust code for rails internal changes --- app/helpers/user_helper.rb | 2 +- app/models/concerns/geo_record.rb | 2 +- lib/rich_text.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/user_helper.rb b/app/helpers/user_helper.rb index c8a80588c..3554980b8 100644 --- a/app/helpers/user_helper.rb +++ b/app/helpers/user_helper.rb @@ -73,7 +73,7 @@ module UserHelper if user.avatar.variable? variant = user.avatar.variant(variant_options) # https://stackoverflow.com/questions/61893089/get-metadata-of-active-storage-variant/67228171 - if variant.processed? + if variant.send(:processed?) metadata = variant.processed.send(:record).image.blob.metadata if metadata["width"] options[:width] = metadata["width"] diff --git a/app/models/concerns/geo_record.rb b/app/models/concerns/geo_record.rb index 23101856a..bd96e0ff3 100644 --- a/app/models/concerns/geo_record.rb +++ b/app/models/concerns/geo_record.rb @@ -9,7 +9,7 @@ module GeoRecord format("%.7f", :coord => self) end - def as_json(_) + def as_json(*) format("%.7f", :coord => self).to_f end end diff --git a/lib/rich_text.rb b/lib/rich_text.rb index a0c4d9c8d..56d358bd8 100644 --- a/lib/rich_text.rb +++ b/lib/rich_text.rb @@ -15,7 +15,7 @@ module RichText include ActionView::Helpers::TextHelper include ActionView::Helpers::OutputSafetyHelper - def sanitize(text) + def sanitize(text, _options = {}) Sanitize.clean(text, Sanitize::Config::OSM).html_safe end end -- 2.39.5