Sha256: 061aa8f52b870e2c5e821743d30bfde85ddb2ea686f08192770756a4496ed457
Contents?: true
Size: 618 Bytes
Versions: 13
Compression:
Stored size: 618 Bytes
Contents
# encoding: utf-8 require 'dm-core' module CarrierWave module DataMapper include CarrierWave::Mount ## # See +CarrierWave::Mount#mount_uploader+ for documentation # def mount_uploader(column, uploader, options={}, &block) super alias_method :read_uploader, :attribute_get alias_method :write_uploader, :attribute_set after :save, "store_#{column}!".to_sym before :save, "write_#{column}_identifier".to_sym after :destroy, "remove_#{column}!".to_sym end end # DataMapper end # CarrierWave DataMapper::Model.send(:include, CarrierWave::DataMapper)
Version data entries
13 entries across 13 versions & 4 rubygems