module Shrine::Plugins::Activerecord

  1. lib/shrine/plugins/activerecord.rb

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

Methods

Public Class

  1. configure

Public Class methods

configure (uploader, opts = {})
[show source]
   # File lib/shrine/plugins/activerecord.rb
11 def self.configure(uploader, opts = {})
12   uploader.opts[:activerecord_callbacks] = opts.fetch(:callbacks, uploader.opts.fetch(:activerecord_callbacks, true))
13   uploader.opts[:activerecord_validations] = opts.fetch(:validations, uploader.opts.fetch(:activerecord_validations, true))
14 end