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

You received this message because you are subscribed to the Google
Groups “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

On Dec 21, 7:14 am, Julien P. [email protected] wrote:

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 ?

If you’re just looking to access it in development, take a look at
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 J.

You received this message because you are subscribed to the Google
Groups “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.