Sha256: a6b56af1cdf6caf47d78beb40f51921b19c332d12768dc1d8f623e28066976a2

Contents?: true

Size: 422 Bytes

Versions: 91

Compression:

Stored size: 422 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

91 entries across 86 versions & 9 rubygems

Version Path
classiccms-0.6.5 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.6.4 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.6.3 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.6.2 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.6.1 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.6.0 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.17 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.16 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.15 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.14 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.13 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.12 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.11 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.10 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.9 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.8 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.7 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.6 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.5 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.5.2 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb