The clearest explanation of the MVC model i've found, courtesy of http://ruby.railstutorial.org/
- The browser issues a request for the /users URL.
- Rails routes /users to the
indexaction in the Users controller.
indexaction asks the User model to retrieve all users (
- The User model pulls all the users from the database.
- The User model returns the list of users to the controller.
- The controller captures the users in the
@usersvariable, which is passed to the
- The view uses embedded Ruby to render the page as HTML.
- The controller passes the HTML back to the browser.