Display ActiveRecord runtime info in the view

Hi list,

In Rails logs, at the end of each request, the log states something like Completed in 37ms (View: 1, DB: 8)

Is there a simple way to access the "DB: 8" info in the view ?

Thanks

Julien

If you're just looking to access it in development, take a look at Rails Footnotes:

http://github.com/josevalim/rails-footnotes

which can do that and a bunch more. If you need it in production, you might want to poke around the internals of rails-footnotes to figure out to get the info.

--Matt Jones