Module: Shrine::Plugins::Versions

Defined in:
lib/shrine/plugins/versions.rb

Overview

Documentation can be found on shrinerb.com/docs/plugins/versions

Defined Under Namespace

Modules: AttacherMethods, ClassMethods, InstanceMethods, Utils

Class Method Summary collapse

Class Method Details

.configure(uploader, **opts) ⇒ Object


14
15
16
17
# File 'lib/shrine/plugins/versions.rb', line 14

def self.configure(uploader, **opts)
  uploader.opts[:versions] ||= { fallbacks: {}, fallback_to_original: true }
  uploader.opts[:versions].merge!(opts)
end

.load_dependencies(uploader) ⇒ Object


9
10
11
12
# File 'lib/shrine/plugins/versions.rb', line 9

def self.load_dependencies(uploader, **)
  uploader.plugin :processing
  uploader.plugin :default_url
end