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



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

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