Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rails authentication with devise
updated: 31/03/2019 with rails 5.2
add `gem 'devise'` to gemfile
bundle install
rails g devise:install
Ensure you have defined default url options in your environments files. Open up config/environments/development.rb and add this line:
```config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }```
Ensure the default route is settled in config/routes, for instance:
```root to home#index```
Ensure to have flash messages in app/views/layouts/application.html.erb
```rails g devise user
rails db:migrate```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.