Skip to content

Commit

Permalink
Clearer init.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Jan 29, 2009
1 parent 94c7dfb commit 6e0f3fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions init.rb
@@ -1,9 +1,11 @@
class ActionController::Base
begin
require 'action_profiler'
include ActionProfiler
begin
require 'action_profiler'
class ActionController::Base
include ActionController::ActionProfiler
logger.info "Action profiling enabled. Add around_filter :action_profiler to ApplicationController then append ?profile=process_time to any URL to profile the page load and download a calltree file. Open it with kcachegrind."
rescue LoadError
end
rescue LoadError
class ActionController::Base
def action_profiler(*args)
logger.info "`gem install ruby-prof` to enable action profiling."
yield
Expand Down

0 comments on commit 6e0f3fa

Please sign in to comment.