I installed devise by creating a personal application. First, enter the following in the Gemfile.
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. ** 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