[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
[Rails] Initial setting of user-created login with devise, devise_token_auth
[Rails] devise
[Rails] Introducing devise
e-Gov setting memo
Rails basic philosophy
[Rails] devise helper method
[Rails] Customize devise validation
java basic knowledge memo
ruby basic syntax memo
Rails + ElasticSearch Survey Memo
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] gem devise installation flow
[Note] Basic information setting (gradle)
(For beginners) [Rails] Install Devise
[Rails] Add column to devise
[rails] error during devise installation
Ruby on Rails Basic Memorandum