Module: CarrierWave::Sequel

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

Defined Under Namespace

Modules: Hooks, Validations

Instance Method Summary collapse

Methods included from Mount

#uploader_option, #uploader_options, #uploaders

Instance Method Details

#mount_uploader(column, uploader) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/carrierwave/orm/sequel.rb', line 9

def mount_uploader(column, uploader)
  raise "You need to use Sequel 3.0 or higher. Please upgrade." unless ::Sequel::Model.respond_to?(:plugin)
  super
 
  alias_method :read_uploader, :[]
  alias_method :write_uploader, :[]=
 
  include CarrierWave::Sequel::Hooks
  include CarrierWave::Sequel::Validations
end