1. sign up - hashed password, confirmation(email), forgot password, remember user
2. login
3. log out
gemfile에 추가
gem 'devise'
devise 설치하고 User model 생성, migrate
bundle install --without production
rails generate devise:install
rails generate devise User
rails db:migrate
controller에 before_action 추가
before_action :authenticate_user!
참고: github.com/heartcombo/devise#starting-with-rails
heartcombo/devise
Flexible authentication solution for Rails with Warden. - heartcombo/devise
github.com
'ruby on rails' 카테고리의 다른 글
setup and use api-key to get stock data (0) | 2020.11.19 |
---|---|
devise: configuring view (0) | 2020.11.19 |
websocket via ActionCable (0) | 2020.11.18 |
view refactoring (0) | 2020.11.18 |
favicon (0) | 2020.11.18 |