module Shrine::Plugins::RemoveInvalid

  1. lib/shrine/plugins/remove_invalid.rb

The remove_invalid plugin automatically deletes a new assigned file if it was invalid and deassigns it from the record. If there was a previous file attached, it will be assigned back, otherwise no attachment will be assigned.

plugin :remove_invalid