Sha256: 2ee95f5e69935fad0776d3d91dd7419e866f42d5b6d8c461d3fc031145c80e70

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

# encoding: utf-8

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

1 entries across 1 versions & 1 rubygems

Version Path
plowdawg-carrierwave-0.5.8 lib/carrierwave/uploader/remove.rb