—
title: Shrine 3.4.0¶ ↑
-
Passing attacher options to
Shrine.Attachmentmethod now works on Ruby 3.0. -
Defining validation errors as an array of I18n key and options in
activerecordplugin now works on Ruby 3.0. -
The
:fastimageMIME type analyzer now correctly detects SVGs asimage/svg+htmlin thedetermine_mime_typeplugin. -
The
Shrine::Attacher#readmethod provided by theentityplugin is now public. This is consistent withShrine::Attacher#writefrommodelplugin being public as well. -
The
Shrine::Attacher#reloadmethod now resets attachment's dirty state. This means that for a model whoseAttacher#changed?returnstrue, calling#reloadon the model will makeAttacher#changed?returnfalse. This was the behaviour beforeShrine3.3.0.
“‘rb # 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
#reloadon the model will not initialize aShrine::Attacherinstance anymore if one hasn’t previously been initialized.