astropanic
astropanic

Reputation: 10939

MongoMapper examine query

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

Answers (1)

jschorr
jschorr

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

Related Questions