How to Install and Use Devise Gem for Authentication in Rails Web Application

9:41 AM

Devise is the best solution of authentication for rails web apps

1: Open your gem file and add
   Gem ‘devise’ (G small)
  Now run command bundle install
2: Generate the devise generator to install in application 
   Rails generate devise: install
3: Now set the devise authentication for Development Environment
config.action_mailer.default_url_options = {host: 'local host', port: 3000}
4: Now generate the devise For Model on which are used
  Rails generate devise Model (put name of model on which you want to used devise authentication For Example User Model)
5: run  rake db: migrate
6: Finally  rails s 

    

You Might Also Like

0 comments

Popular Posts

Like us on Facebook