The MVC Architecture

Rails is based on the MVC (Model-View-Controller) design pattern:

  • Model: Handles data and business logic (e.g., ActiveRecord models)
  • View: Displays data to the user using ERB templates
  • Controller: Handles incoming requests and connects models with views

This separation makes your application modular, maintainable, and scalable.

← PrevNext →