fedibird-fe/lib/paperclip/url_generator_extensions.rb
2023-03-01 20:23:56 +09:00

11 lines
291 B
Ruby

# frozen_string_literal: true
module Paperclip
module UrlGeneratorExtensions
def for_as_default(style_name)
attachment_options[:interpolator].interpolate(default_url, @attachment, style_name)
end
end
end
Paperclip::UrlGenerator.prepend(Paperclip::UrlGeneratorExtensions)