By @tenderlove. Full post I am puts debugger
Here I can see that render
calls super, but I don’t know where that is implemented. In that case, I use super_method
on the return value of method
.
So I change this:
def index
p method(:render).source_location
render params[:id]
end
To this:
def index
p method(:render).super_method.source_location
render params[:id]
end
Run the same request through, and I get this for the output:
Processing by UsersController#show as */*
Parameters: {"id"=>"xxxx"}
["/Users/aaron/git/rails/actionpack/lib/action_controller/metal/rendering.rb", 34]
Completed 500 Internal Server Error in 34ms (ActiveRecord: 0.0ms)
Now I see that super
goes here. That method also calls super, but I can just rinse and repeat the above process (or use a loop!) to find the method I actually care about.