Skip to main content

Shrine 3.10.1

Bug fixes​

  • Since Shrine 3.9.0, the remove_invalid plugin would raise NoMethodError when validation failed on an attacher without a record and the model plugin was loaded (directly or through the activerecord/sequel plugins).

    attacher = Shrine::Attacher.new
    attacher.assign(invalid_file)
    # NoMethodError: undefined method '=' for nil

    Attacher#write from the model plugin is now a no-op when the attacher isn't backed by a model, so the invalid file is removed and validation errors are kept as before.