Wed 19 May 2021 8:04PM
Where is the index route for API::EventsController?
![ELP](https://secure.gravatar.com/avatar/477df5426c836272b13cbcbab1c734ef.png?d=retro&r=pg&s=128)
I am trying to understand how comments are filtered and sorted in the code. According to server output, /api/v1/events gets routed to API::EventsController#index, but I don't see that index method defined anywhere. Where is it defined?
![ELP](https://secure.gravatar.com/avatar/477df5426c836272b13cbcbab1c734ef.png?d=retro&r=pg&s=128)
Edward L Platt Mon 24 May 2021 12:37AM
Ah, it's in snorlax. Gotcha, thanks!
Robert Guthrie · Mon 24 May 2021 12:26AM
Hi @Edward L Platt, the EventsController#index method is not defined, so it inherits behaviour from the snorlax base definition, which looks like this:
and instantiate collection looks like this, which is where you can start to see it call methods from events controller.