문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top