Module: CarrierWave::Uploader::Remove

Extended by:
ActiveSupport::Concern
Includes:
Callbacks
Included in:
Base
Defined in:
lib/carrierwave/uploader/remove.rb

Instance Method Summary collapse

Methods included from Callbacks

#with_callbacks

Instance Method Details

#remove!Object

Removes the file and reset it



11
12
13
14
15
16
17
# File 'lib/carrierwave/uploader/remove.rb', line 11

def remove!
  with_callbacks(:remove) do
    @file.delete if @file
    @file = nil
    @cache_id = nil
  end
end