TECH CAMP learning personal application creation ②

Create a user model using devise

I installed devise by creating a personal application. First, enter the following in the Gemfile. image.png

By the way, devise is said to mean ** "invent, devise, devise, invent" ** in Japanese.

Then at the terminal 『bundle install』 『rails g devise:install』 『rails g devise user』

Are executed in order.

Then edit the migration file as follows.

Next, edit app / models / user.rb as follows. image.png ** Validates means to verify in Japanese, presence means existence, and uniqueness means uniqueness. ** **

By translating the code written in English into Japanese, I felt that the meaning could be understood well. ** Also, migration seems to mean move, migration. In other words, the migration file may be an image like a blueprint for moving to a database table. ** **

Recommended Posts

TECH CAMP learning personal application creation ③
TECH CAMP learning personal application creation ②
☆ First post: TECH CAMP learning, personal application creation ①, fledgling engineer
Personal application creation # 2
Personal application creation # 3
Personal application creation # 1
TECH CAMP learning personal app ④ git ignore
[Personal application creation] Information management application production 16th day
[Personal application creation] Information management application production 14th day
2020/10/1 Tech Camp Day 11 Output
2020/10/3 Tech Camp Day 13 Output
Personal application development diary # 2
2020/10/2 Tech Camp Day 12 Output
Personal application production diary 3
2020/10/4 Tech Camp Day 14 Output
Personal application development diary # 3
TECH CAMP After 10 weeks
[Spring Boot] Web application creation
Ruby Learning # 99 Personal Programming Notebook
[Impression] Take a Tech Camp
Task management application creation procedure