Many a time, it’s essential to find the rails controller being called to render the current view’s JSON. Here’s a simple way to do it.
-
Go to the Network tab(according to your browser) and look for the ajax request which is fetching the data.
-
Check the value of
x-discourse-route
in response headers. It’s in the formatcontroller/action
.