Shrine 3.4.0
Passing attacher options to
Shrine.Attachment
method now works on Ruby 3.0.Defining validation errors as an array of I18n key and options in
activerecord
plugin now works on Ruby 3.0.The
:fastimage
MIME type analyzer now correctly detects SVGs asimage/svg+html
in thedetermine_mime_type
plugin.The
Shrine::Attacher#read
method provided by theentity
plugin is now public. This is consistent withShrine::Attacher#write
frommodel
plugin being public as well.The
Shrine::Attacher#reload
method now resets attachment's dirty state. This means that for a model whoseAttacher#changed?
returnstrue
, calling#reload
on the model will makeAttacher#changed?
returnfalse
. This was the behaviour before Shrine 3.3.0.# before model.file_attacher.changed? #=> true model.reload model.file_attacher.changed? #=> true # after model.file_attacher.changed? #=> true model.reload model.file_attacher.changed? #=> false
Calling
#reload
on the model will not initialize aShrine::Attacher
instance anymore if one hasn't previously been initialized.