Reputation: 10939
How I can check which query will be send to the MongoDB server when I call a certain association on my model from the Rails console ?
Upvotes: 0
Views: 293
Reputation: 3054
turn on MongoMapper logging in your connection string (typically in an initializer file):
MongoMapper.connection = Mongo::Connection.new('localhost', 27017, :logger => Rails.logger) #the logger param does the trick
Upvotes: 1