module Shrine::Plugins::Sequel

  1. lib/shrine/plugins/sequel.rb

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

Methods

Public Class

  1. configure
  2. load_dependencies

Public Class methods

configure (uploader, **opts)
[show source]
   # File lib/shrine/plugins/sequel.rb
14 def self.configure(uploader, **opts)
15   if opts.key?(:callbacks)
16     Shrine.deprecation("The :callbacks option in sequel plugin has been renamed to :hooks. The :callbacks alias will be removed in Shrine 4.")
17     opts[:hooks] = opts.delete(:callbacks)
18   end
19 
20   uploader.opts[:sequel] ||= { hooks: true, validations: true }
21   uploader.opts[:sequel].merge!(opts)
22 end
load_dependencies (uploader, **)
[show source]
   # File lib/shrine/plugins/sequel.rb
 9 def self.load_dependencies(uploader, **)
10   uploader.plugin :model
11   uploader.plugin :_persistence, plugin: self
12 end