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"]
format("%<coord>.7f", :coord => self)
end
- def as_json(_)
+ def as_json(*)
format("%<coord>.7f", :coord => self).to_f
end
end
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