[Devise] rails memo basic setting initial setting

【goal】

devise initial, basic setting summary Surprisingly, it gets messed up, so ...

【merit】

■ Work efficiency UP ■ Improved understanding of devise

【Development environment】

■ Mac OS catalina ■ Ruby on Rails (5.2.4.2) ■ Virtual Box:6.1 ■ Vagrant: 2.2.7

【command】

Initialize devise

$ rails g devise:install

* If an error occurs,
$ bundle exec spring stop

Create model

$ rails g devise:app name

Create each view

$rails g devise views app name

Create each controller

$ rails g controllers devise:app name

When creating an email approval function

db/migrate/devise_creat_app name.rb


## Confirmable
      t.string   :confirmation_token
      t.datetime :confirmed_at
      t.datetime :confirmation_sent_at
      t.string   :unconfirmed_email # Only if using reconfirmable

When creating an API login function

db/migrate/devise_creat_app name.rb


## Trackable
      t.integer  :sign_in_count, default: 0, null: false
      t.datetime :current_sign_in_at
      t.datetime :last_sign_in_at
      t.string   :current_sign_in_ip
      t.string   :last_sign_in_ip

that's all

[I want to read it together]

■ [Environment variables] What are rails environment variables? https://qiita.com/tanaka-yu3/items/7bf03fee906b80367be9

■ Fastest rails mail devise Welcome mail sending function implementation action mailer unnecessary The easiest https://qiita.com/tanaka-yu3/items/2def7760fd67fe73091a

■ [devise] Administrator user login and logout are separated https://qiita.com/tanaka-yu3/items/046bf30e08e48fbc42ca

Recommended Posts

[Devise] rails memo basic setting initial setting
[My style] rails Initial setting memo
[Rails] Initial setting of user-created login with devise, devise_token_auth
[Rails] devise
[Rails] Introducing devise
rails + devise + devise_token_auth
e-Gov setting memo
Rails basic philosophy
[Rails] devise helper method
[Rails] Customize devise validation
java basic knowledge memo
Docker x Rails 6 (memo)
ruby basic syntax memo
Rails + ElasticSearch Survey Memo
Handle devise with Rails
MEMO about Rails 6 series
Java learning memo (basic)
[Rails] devise introduction method
[rails] About devise defaults
I was addicted to setting default_url_options with Rails devise introduction
[Rails] Introduction of devise Basics
What is Rails gem devise?
[IntelliJ] Initial setting procedure of IntelliJ
[Rails] gem devise installation flow
[Note] Basic information setting (gradle)
[Rails] How to install devise
Ruby on Rails basic learning ①
(For beginners) [Rails] Install Devise
[Rails] Add column to devise
Rails Asset Pipeline Basic Key
[rails] error during devise installation
Ruby on Rails Basic Memorandum
Memorandum [Rails] User authentication Devise