What code runs when you request a page from a Ruby on Rails application?
Here is an annotated trace showing every method call within Rails and its dependencies. It is for an example application that loads a blog post from the database and renders a page containing the post's title.
show method in our
PostsController is called. Our
show method is empty since we've already loaded the record we want to show in a
before_action and are relying on Rails's default rendering to render the correct view template for us.