Microblog App II 2020
bogotobogo.com site search:
Note
users and microposts table:
| users | |
| id | integer |
| name | string |
| string | |
| microposts | |
| id | integer |
| content | string |
| user_id | integer |
Creating a user
| URL | Action | Purpose |
|---|---|---|
| /users | index | page to list all users |
| /users/1 | show | page to show user with id 1 |
| /users/new | new | page to make a new user |
| /users/1/edit | edit | page to edit user with id 1 |
To make a new user, we open the new page, as shown in the picture below.
We create a user by entering name and email values in the text fields and then clicking the Create User button. The result is shown in the page with url /users/1. The number 1 is simply the user's id attribute
Editing / Updating user's info
We can change a user's information:
Update:
Creating a 2nd user and Users list
Now we'll create a second user:
The resulting user index is shown in the picture below:
Destroying User
Ph.D. / Golden Gate Ave, San Francisco / Seoul National Univ / Carnegie Mellon / UC Berkeley / DevOps / Deep Learning / Visualization