joshsusser (owner)

Revisions

gist: 62151 Download_button fork
public
Public Clone URL: git://gist.github.com/62151.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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