title: How to profile a rails controller that returns a json response with rack-mini-profiler?
body: <p>I am using rack-mini-profiler in my rails 3.2 project.</p>
  
  <p>In gemfile:</p>
  
  <pre><code>gem 'rack-mini-profiler'
  </code></pre>
  
  <p>Everything works great. But my application is mostly a set of json endpoints. So while it is very useful to be to able to inspect the performance of html pages, I would like to also be able to see the performance of controllers that return json.</p>
  
  <p>Example of my controller:</p>
  
  <pre><code>class UsersController &lt; BaseController
    def json_method
      # you don't see the mini profiler ui for this controller
      render json: { users: [:foo, :bar]}
    end
  end
  </code></pre>
  
  <p>If I go to <code>localhost:3000/users/json_method</code>, I see my json response but not the profiler ui.</p>