about summary refs log tree commit diff
path: root/lib/paperclip/url_generator_extensions.rb
blob: a2cf5929afd6e65364d2d2c52fcd732c9113fbd5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# 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)