- Contain the domain logic of an application, which tell you how records in database are retrieved, validated, or manipulated
- the layer between the users and the database
- Call methods in the model classes
- from the methods they return single objects or arrays of objects
- Make objects available to the View via instance variables
- Used for permission checking (making sure users who have permission get access, and those who don't, don't get access).
- Reference instance variables to display information it gets from the controller.
- ERB (Embedded Ruby) is a templating language included in Rails by degault that lets you embed ruby files into any other kind of file, so when users see your application in the View, they are seeing files that have ruby embedded in them.
- It's for the standard applications (JS, CSS) that make the app look pretty.p
- Where you put the Ruby code (helper methods and modules) for the Views .
- Where you put the classes of the application that deal with sending emails.
- REST = Representational State Transfer. It's the convention for routing, how requests are routed (e.g. how urls map to the controller, where a form submits data)
- Scaffolds are generated to provide temporary structures to get you started on an application
- The
scaffold
command generates your model, views, and controller, and the tests
- Ruby classes that define a
change
method - They inherit from ActiveRecord::Migration
- something_
params
is a strong parameters method calledparams
, that returns parameters sent from a form or something in your app, in a hash-like object