16: each resource generates 8 routes
2: Treasure
and Comment
Technically 3, although we created 2 and one is the generic application controller.
Inside the controller. Routes direct to an action which is specific to a CRUD operation. The actual code is held inside these actions.
The form to create a new treasure is in the new.html.erb
file. The body of the form is rendered using the partial _form.html.erb
.
The form is rendered on the treasure show.html.erb
page. The _form.html.erb
in app/views/comments
is used to create a new comment.
The index page of treasures app/views/treasure/index.html.erb
app/views/treasure/index.html.erb
String
, description:Text
, created_at:datetime
, updated_at:datetime
)String
, comment:Text
, treasure_id:int
, created_at:datetime
, updated_at:datetime
)schema.rb
in the db folder