module Shrine::Plugins::Activerecord

  1. lib/shrine/plugins/activerecord.rb

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

Methods

Public Class

  1. configure
  2. load_dependencies

Public Class methods

configure (uploader, **opts)
[show source]
   # File lib/shrine/plugins/activerecord.rb
14 def self.configure(uploader, **opts)
15   uploader.opts[:activerecord] ||= { callbacks: true, validations: true }
16   uploader.opts[:activerecord].merge!(opts)
17 end
load_dependencies (uploader, **)
[show source]
   # File lib/shrine/plugins/activerecord.rb
 9 def self.load_dependencies(uploader, **)
10   uploader.plugin :model
11   uploader.plugin :_persistence, plugin: self
12 end