Skip to content

Instantly share code, notes, and snippets.

@joshsusser
Created February 11, 2009 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshsusser/62151 to your computer and use it in GitHub Desktop.
Save joshsusser/62151 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
around_filter :you_are_here
def you_are_here
puts "***** NEW ACTION: #{controller_name} - #{action_name} *****"
begin
yield
ensure
puts "<pre>"
if $! then
puts "***** CAUGHT EXCEPTION: #{$!.message}"
puts $!.backtrace
raise
else
puts "***** CALL STACK *****"
puts caller
end
puts "</pre>"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment