A quick note on logging SQL queries in DataMapper 1.2 so you can see exactly what’s going on behind the scenes. Seeing the query can be beneficial in debugging when getting unexpected results or trying to increase query performance. DataMapper::Logger.new($stdout, :debug) Enter that at anytime while running in rails c and you should start seeing the output immediatley. Note If you don’t see the output potentially it’s because of DM’s identiity map.

Continue reading

Author's picture

Brian Pearce

Software Engineer, Endurance Cyclist,
Rubiest, and Rustacean

Software Engineer

Barcelona, Spain