Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 622 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 622 Bytes

notes

The model is the layer that communicates with the database.

The center of all in a MVC application is the controller.

When you generate a new controller, beside the controller itself a view and a helper are also created.

Because the root route is special route you use # instead of /.

The controller class name must match the .rb file name.

Every controller must inherit from the ApplicationController.

class HomeController < ApplicationController
  ...
end

ERB consists of 3 main parts:

  • The logic part: <% %>
  • The rendering part: <%= %>
  • The commenting part: <%# %>