module Shrine::Plugins::DefaultUrl

  1. lib/shrine/plugins/default_url.rb

Documentation lives in doc/plugins/default_url.md on GitHub.

Methods

Public Class

  1. configure

Public Class methods

configure (uploader, opts = {}, &block)
[show source]
   # File lib/shrine/plugins/default_url.rb
 9 def self.configure(uploader, opts = {}, &block)
10   uploader.opts[:default_url_host] = opts.fetch(:host, uploader.opts[:default_url_host])
11 
12   if block
13     uploader.opts[:default_url] = block
14     Shrine.deprecation("Passing a block to default_url plugin is deprecated and will probably be removed in future versions of Shrine. Use `Attacher.default_url { ... }` instead.")
15   end
16 end