lib/lockbox/railtie.rb in lockbox-0.2.3 vs lib/lockbox/railtie.rb in lockbox-0.2.4
- old
+ new
@@ -4,9 +4,12 @@
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