Sha256: c9e5964e911709b19f80a0ff2bab766ad3892c6eec849da65003f2465c224bad

Contents?: true

Size: 453 Bytes

Versions: 4

Compression:

Stored size: 453 Bytes

Contents

if defined?(Mongoid::Document)
  require 'dragonfly'

  app = Dragonfly[:images]

  # Configure to use ImageMagick, Rails defaults, and the Mongo data store
  app.configure_with(:imagemagick)
  app.configure_with(:rails) do |c|
    c.datastore = Dragonfly::DataStorage::MongoDataStore.new :db => Mongoid.database
  end

  # Allow all mongoid models to use the macro 'image_accessor'
  app.define_macro_on_include(Mongoid::Document, :image_accessor)
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
rails_admin-0.0.3 spec/dummy_app/config/initializers/dragonfly.rb
rails_admin-0.0.2 spec/dummy_app/config/initializers/dragonfly.rb
upstream-rails_admin-1.0.2 spec/dummy_app/config/initializers/dragonfly.rb
rails_admin-0.0.1 spec/dummy_app/config/initializers/dragonfly.rb