url_generator_extensions.rb 291 B

1234567891011
  1. # frozen_string_literal: true
  2. module Paperclip
  3. module UrlGeneratorExtensions
  4. def for_as_default(style_name)
  5. attachment_options[:interpolator].interpolate(default_url, @attachment, style_name)
  6. end
  7. end
  8. end
  9. Paperclip::UrlGenerator.prepend(Paperclip::UrlGeneratorExtensions)