Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Latest commit

 

History

History
32 lines (19 loc) · 804 Bytes

README.rdoc

File metadata and controls

32 lines (19 loc) · 804 Bytes

CarrierWave for Datamapper

<img src=“https://travis-ci.org/jnicklas/carrierwave-datamapper.png?branch=master” alt=“Build Status” />

This gem adds support for DataMapper to CarrierWave, see the CarrierWave documentation for more detailed usage instructions.

Installation

gem install carrierwave-datamapper

Using bundler:

gem 'carrierwave-datamapper', :require => 'carrierwave/datamapper'

Usage

require 'carrierwave/datamapper'

class ImageUploader < CarrierWave::Uploader::Base
  include CarrierWave::MiniMagick
end

class Image
  include DataMapper::Resource

  property :id, Serial

  mount_uploader :source, ImageUploader
end

This used to be part of CarrierWave but has been extracted.