File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -434,11 +434,13 @@ <h2><a id="profiling-rails"> Profiling Rails</a></h2>
434434< span class ="ruby-keyword "> end</ span >
435435</ pre > </ li >
436436 < li >
437- < p > Add the ruby prof rack adapter to your middleware stack. One way
438- to do this is by adding the following code to < code > config.ru</ code > :</ p >
437+ < p > Add the ruby prof rack adapter to your middleware stack. The
438+ Rails < a href ="https://guides.rubyonrails.org/configuring.html#configuring-middleware "
439+ title ="Configure Middleware "> documentation</ a > describes several
440+ ways to do this. One way is to add the following code to < code > application.rb</ code > :</ p >
439441 < pre class ="ruby "> < span class ="ruby-keyword "> if</ span > < span class ="ruby-constant "> Rails</ span > .< span
440442class ="ruby-identifier "> env</ span > .< span class ="ruby-identifier "> profile?</ span >
441- < span class ="ruby-identifier " > use</ span > < span class ="ruby-constant "> Rack</ span > < span
443+ < code class ="ruby plain " > config.middleware. use</ code > < span class ="ruby-constant "> Rack</ span > < span
442444class ="ruby-operator "> ::</ span > < span class ="ruby-constant "> RubyProf</ span > , < span
443445class ="ruby-value "> :path</ span > < span class ="ruby-operator "> =></ span > < span class ="ruby-string "> './tmp/profile'</ span >
444446< span class ="ruby-keyword "> end</ span >
You can’t perform that action at this time.
0 commit comments