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
carrierwave-0.11.2 lib/carrierwave/uploader/remove.rb
carrierwave-0.11.1 lib/carrierwave/uploader/remove.rb
carrierwave-0.11.0 lib/carrierwave/uploader/remove.rb
classiccms-0.7.5 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.7.4 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.7.3 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
carrierwave-0.10.0 lib/carrierwave/uploader/remove.rb
carrierwave-0.9.0 lib/carrierwave/uploader/remove.rb
classiccms-0.7.2 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.7.1 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.7.0 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
carrierwave-0.8.0 lib/carrierwave/uploader/remove.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/carrierwave-0.7.1/lib/carrierwave/uploader/remove.rb
classiccms-0.6.9 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
carrierwave-pressplane-0.5.8.3 lib/carrierwave/uploader/remove.rb
classiccms-0.6.8 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
classiccms-0.6.7 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
carrierwave-0.7.1 lib/carrierwave/uploader/remove.rb
classiccms-0.6.6 vendor/bundle/gems/carrierwave-0.6.2/lib/carrierwave/uploader/remove.rb
carrierwave-0.7.0 lib/carrierwave/uploader/remove.rb