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.
ActiveRecord is Rails's model layer. It models records in your application that you want to persist to a database.
You can see methods being called here to help manage database connections and to generate the SQL query to needed to load our
Post record from the database. Once the query is run Rails creates a new
Post object with fields from the database.