Skip to content

Instantly share code, notes, and snippets.

@nantrinh
nantrinh / lesson_1_summary.md
Last active October 24, 2019 08:19
rails_lesson_1

Introduction

This article summarizes what I learned in Lesson 1 of the Launch School 5301 Rails Course. I used Rails 6 and Ruby 2.5.3.

Instructions

Create an app called PostIt based on the entity relationship diagram. ERD

Create routes for posts and categories. Prevent the delete route from being accessed.

Create controllers and views to view:

  • all posts

How I Memorized Rails Routes

We are asked to memorize the 7 default routes created when we define a single entry in the routing file, for example resources :posts.

This is how I memorized the 7 routes and the 4 helpers in the Rails guides:

Rails routes and helpers

I used posts as an example of a resource and reorganized the table shown in the guide in a way that makes sense to me.