Module: CarrierWave::Uploader::Callbacks

Extended by:
ActiveSupport::Concern
Included in:
Base, Cache, Download, Processing, Remove, Store, Versions
Defined in:
lib/carrierwave/uploader/callbacks.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#with_callbacks(kind, *args) ⇒ Object



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

def with_callbacks(kind, *args)
  self.class._before_callbacks_for(kind).each { |callback| self.send(callback, *args) }
  yield
  self.class._after_callbacks_for(kind).each { |callback| self.send(callback, *args) }
end