Created
November 3, 2011 21:33
-
-
Save samg/1337842 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController | |
private | |
def newrelic_metric_path(action_name_override = nil) | |
format_string = case | |
when request.format.html? | |
'.html' | |
when request.format.json? | |
'.json' | |
when request.format.xml? | |
'.xml' | |
end | |
"#{super}#{format string}" | |
end | |
end | |
# This should cause your controller actions to be reported under names like | |
# BlogController#index.json, BlogController#index.html, etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sweet gist bro