:: Ruby MVC Architecture ::
Basically in Ruby MVC architecture working as
Starting from routes where all endpoints added and its controller and method name added there
1. Routes:from Routes, the endpoint connects with controllers (mentioned in the routes.rb file) and its method name
2. From Controller, it will call the Model (ActiveRecords)to fetch or DB logical query and the data will return to the controller
3. Model: In model the DB Query done ,its response will return to the Controllers
4. If View is present in that case it can be displayable in View(.erb.html) otherwise it will render as JSON for API case as requirement
Suppose the endpoint is not present in the routes.rb then it error will come as 404 error
Basically, the controller is acting as bridge between view and DB data as response.