Module: CarrierWave::Sequel::Hooks

Defined in:
lib/carrierwave/orm/sequel.rb

Overview

Instance hook methods for the Sequel 3.x

Instance Method Summary collapse

Instance Method Details

#after_saveObject



25
26
27
28
# File 'lib/carrierwave/orm/sequel.rb', line 25

def after_save
  return false if super == false
  self.class.uploaders.each_key {|column| self.send("store_#{column}!") }
end

#before_destroyObject



35
36
37
38
# File 'lib/carrierwave/orm/sequel.rb', line 35

def before_destroy
  return false if super == false
  self.class.uploaders.each_key {|column| self.send("remove_#{column}!") }
end

#before_saveObject



30
31
32
33
# File 'lib/carrierwave/orm/sequel.rb', line 30

def before_save
  return false if super == false
  self.class.uploaders.each_key {|column| self.send("write_#{column}_identifier") }
end