Sha256: c66a643aa9204a11461304e49501b9a3bae8dbd3fbb81c69c805b85488499407

Contents?: true

Size: 403 Bytes

Versions: 41

Compression:

Stored size: 403 Bytes

Contents

module CarrierWave
  module Uploader
    module Remove
      extend ActiveSupport::Concern

      include CarrierWave::Uploader::Callbacks

      ##
      # Removes the file and reset it
      #
      def remove!
        with_callbacks(:remove) do
          @file.delete if @file
          @file = nil
          @cache_id = nil
        end
      end

    end # Remove
  end # Uploader
end # CarrierWave

Version data entries

41 entries across 41 versions & 3 rubygems

Version Path
carrierwave-3.1.0.beta lib/carrierwave/uploader/remove.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/carrierwave-2.2.6/lib/carrierwave/uploader/remove.rb
carrierwave-3.0.7 lib/carrierwave/uploader/remove.rb
carrierwave-2.2.6 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.6 lib/carrierwave/uploader/remove.rb
carrierwave-2.2.5 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.5 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.4 lib/carrierwave/uploader/remove.rb
carrierwave-1.3.4 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.3 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.2 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.1 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.0 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.0.rc lib/carrierwave/uploader/remove.rb
carrierwave-2.2.4 lib/carrierwave/uploader/remove.rb
carrierwave-1.3.3 lib/carrierwave/uploader/remove.rb
carrierwave-2.2.3 lib/carrierwave/uploader/remove.rb
carrierwave-3.0.0.beta lib/carrierwave/uploader/remove.rb
carrierwave-2.2.2 lib/carrierwave/uploader/remove.rb
carrierwave-2.2.1 lib/carrierwave/uploader/remove.rb