]> git.openstreetmap.org Git - rails.git/commitdiff
Adjust code for rails internal changes
authorTom Hughes <tom@compton.nu>
Fri, 6 Oct 2023 21:18:30 +0000 (22:18 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 18 Oct 2023 17:26:14 +0000 (18:26 +0100)
app/helpers/user_helper.rb
app/models/concerns/geo_record.rb
lib/rich_text.rb

index c8a80588ca6a830ddb9b1b9c48c6cfc4b02461f0..3554980b84fc37fa53e7f23f797c2a401f364455 100644 (file)
@@ -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 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"]
         metadata = variant.processed.send(:record).image.blob.metadata
         if metadata["width"]
           options[:width] = metadata["width"]
index 23101856af59af4b1d79b98e6657942fad6f326a..bd96e0ff33261630e848d65a20926c8b7857a233 100644 (file)
@@ -9,7 +9,7 @@ module GeoRecord
       format("%<coord>.7f", :coord => self)
     end
 
       format("%<coord>.7f", :coord => self)
     end
 
-    def as_json(_)
+    def as_json(*)
       format("%<coord>.7f", :coord => self).to_f
     end
   end
       format("%<coord>.7f", :coord => self).to_f
     end
   end
index a0c4d9c8debc70fb3a39c6a32d7ffecf7b9aa867..56d358bd8dcb2823afa64a7dcb56e62f5a40d589 100644 (file)
@@ -15,7 +15,7 @@ module RichText
     include ActionView::Helpers::TextHelper
     include ActionView::Helpers::OutputSafetyHelper
 
     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
       Sanitize.clean(text, Sanitize::Config::OSM).html_safe
     end
   end