DEV Community

Maya Sheriff
Maya Sheriff

Posted on

How to Install Devise

Use Devise for Users

Install

rails generate devise:install
Enter fullscreen mode Exit fullscreen mode

Change :delete to :getin devise file

# config/initializers/devise.rb, Line 269

config.sign_out_via = :get
Enter fullscreen mode Exit fullscreen mode

Set a root route in routes

# config/routes.rb

root "boards#index"
Enter fullscreen mode Exit fullscreen mode

Use our new generator supplied by the gem to create the User model and routes

rails generate devise user
Enter fullscreen mode Exit fullscreen mode

Then Migrate

rake  db:migrate
Enter fullscreen mode Exit fullscreen mode

Top comments (0)