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-2.2.0 lib/carrierwave/uploader/remove.rb
carrierwave-2.1.1 lib/carrierwave/uploader/remove.rb
carrierwave-1.3.2 lib/carrierwave/uploader/remove.rb
carrierwave-2.1.0 lib/carrierwave/uploader/remove.rb
carrierwave-2.0.2 lib/carrierwave/uploader/remove.rb
carrierwave-2.0.1 lib/carrierwave/uploader/remove.rb
carrierwave-2.0.0 lib/carrierwave/uploader/remove.rb
carrierwave-2.0.0.rc lib/carrierwave/uploader/remove.rb
carrierwave-1.3.1 lib/carrierwave/uploader/remove.rb
carrierwave-1.3.0 lib/carrierwave/uploader/remove.rb
carrierwave-1.2.3 lib/carrierwave/uploader/remove.rb
carrierwave-1.2.2 lib/carrierwave/uploader/remove.rb
carrierwave-1.2.1 lib/carrierwave/uploader/remove.rb
carrierwave-1.2.0 lib/carrierwave/uploader/remove.rb
carrierwave-1.1.0 lib/carrierwave/uploader/remove.rb
carrierwave-1.0.0 lib/carrierwave/uploader/remove.rb
carrierwave-1.0.0.rc lib/carrierwave/uploader/remove.rb
card-1.19.3 vendor/carrierwave/lib/carrierwave/uploader/remove.rb
card-1.19.2 vendor/carrierwave/lib/carrierwave/uploader/remove.rb
carrierwave-1.0.0.beta lib/carrierwave/uploader/remove.rb