Sha256: f91c3eb1f88d448a6f56e40997198c36642652a928e7ff68e2611986446f5399
Contents?: true
Size: 962 Bytes
Versions: 4
Compression:
Stored size: 962 Bytes
Contents
module Lockbox class Railtie < Rails::Railtie initializer "lockbox" do |app| require "lockbox/carrier_wave_extensions" if defined?(CarrierWave) if defined?(ActiveStorage) require "lockbox/active_storage_extensions" ActiveStorage::Attached.prepend(Lockbox::ActiveStorageExtensions::Attached) if ActiveStorage::VERSION::MAJOR >= 6 ActiveStorage::Attached::Changes::CreateOne.prepend(Lockbox::ActiveStorageExtensions::CreateOne) end ActiveStorage::Attached::One.prepend(Lockbox::ActiveStorageExtensions::AttachedOne) ActiveStorage::Attached::Many.prepend(Lockbox::ActiveStorageExtensions::AttachedMany) end app.config.to_prepare do if defined?(ActiveStorage) ActiveStorage::Attachment.include(Lockbox::ActiveStorageExtensions::Attachment) ActiveStorage::Blob.prepend(Lockbox::ActiveStorageExtensions::Blob) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lockbox-0.4.1 | lib/lockbox/railtie.rb |
lockbox-0.4.0 | lib/lockbox/railtie.rb |
lockbox-0.3.7 | lib/lockbox/railtie.rb |
lockbox-0.3.6 | lib/lockbox/railtie.rb |