From: Tom Hughes Date: Fri, 6 Oct 2023 21:18:30 +0000 (+0100) Subject: Adjust code for rails internal changes X-Git-Tag: live~954^2~3 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a6b5f2f56d00efef7c8bdbe451db2655731f5ae6?hp=46cd08b1c866162cafa92fb0aa2b38ca6fe1f353 Adjust code for rails internal changes --- 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