Skip to main content
2 of 5
added 468 characters in body

A View should be as dumb as possible. It should not access the database. Fetching the data is the responsibility of the Controller.

The controller should use an ORM to fetch the data from the database and feed it to the appropriate view.

Edit

Let's assume you are writing a web app to manage books. You write a BooksController and you have an action to show the details of a book. Let's assume you call that action show. In the show action, you query the database for the boom you want to show the details of (using an ORM). You store it in a variable and pass in that variable to the view to be rendered. How you pass that variable depends on how you have implemented the rendering logic.