Domanda

I am trying to upgrade my app to mongoid version 3. In my dragonfly initializer I used to have this:

app.configure_with(:imagemagick)
app.configure_with(:rails) do |c|
  c.datastore = Dragonfly::DataStorage::MongoDataStore.new :db => Mongoid.database
end

Mongoid.database no longer exists. What is the best way to configure the connection for dragonfly now?

È stato utile?

Soluzione

I use Mongoid.load!("config/mongoid.yml", :development) instead of Mongoid.database. And it's works for me.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top