MongoMapper – undefined method 'reflect_on_association'

Information Tidbit: If you’re using reflection_on_association with ActiveRecord and need to use it with MongoMapper, here is what you want to do: undefined method `reflect_on_association' for User:Class ActiveRecord: User.reflect_on_association(:posts).klass.new MongoMapper: User.associations[:posts].klass.new Mongoid: User.associations['posts'].klass.new notice the posts is a string, it will not work with a symbol UPDATE – (Apr 2011) Mongoid now follows...

Getting Paperclip to work with MongoMapper

Last night I was trying really hard to get MongoMapper to work with Paperclip via GridFS and failed. It seems right now Paperclip or even CarrierWave are not ready to be used with the latest MongoMapper drivers and GridFS (and I needed to use the latest drivers due to Scopify). After giving up using GridFS, I wanted to use Paperclip with MongoMapper with the normal file system and I found this article from Ben Curtis, however with the latest version of Paperclip...

MongoMapper logging to Rails log

I started playing around with MongoMapper for MongoDB and I have to say I’m loving it! Somehow it just feels so much easier to work with. However, I did have an issue with my code and needed to see whether or not MongoMapper was looking for account_id in my model. Since there is no sql to look at, I was looking for a way to see what MongoMapper was sending to MongoDB. Luckily the answer was very simple, in your connection string you just have to do this:...