Skip to content

Instantly share code, notes, and snippets.

@samg
Created November 3, 2011 21:33
Show Gist options
  • Select an option

  • Save samg/1337842 to your computer and use it in GitHub Desktop.

Select an option

Save samg/1337842 to your computer and use it in GitHub Desktop.
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.
@bradhe
Copy link
Copy Markdown

bradhe commented Nov 4, 2011

sweet gist bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment