Ruby on Rails MVC
Ruby on Rails MVC Like most of the other frameworks, Rails is also based on MVC pattern. It basically works as following: Requests first come to the controller, controller finds an appropriate view and interacts with model which in turn interacts with database and send response to controller. Then controller gives the output to the view based on the response. Model The models are classes in Rails. They interact with database, store data, handles validation, transaction, etc. This subsystem is implemented in ActiveRecord library. This library provides an interface between database tables and Ruby program code that manipulates database records. Ruby method names are automatically generated from database tables field names. View View represent data in a particular format in an application for the users. It handles HTML, CSS, JavaScript and XML in an application. They do what controller tells them. This subsystem is implemented in ActionView library. This libr...