Skip to main content

Posts

Showing posts with the label ruby functionality

Ruby on Rails application using Devise

Devise is a flexible authentication solution for Rails. It is a complete MVC solution based on Rails engines. It allows you to have multiple models signed in at the same time. It hashes and stores a password in the database to validate the authenticity of a user while signing in. The authentication can be done both through POST requests or HTTP Basic Authentication. STEP 1. gem ‘devise’ install. STEP 2. run bundle install STEP 3. run rails generate devise:install STEP 4. run rails generate devise:views STEP 5. Here in this application we mainly need 2 models, one is member model and the other one is contact model. So now we are going to create our  member model using devise:run rails generate devise member The migration file will located in db/migrate/ devise_create_members.rb. STEP 6. After that you should have to run rake db:create (For creating new database) STEP 7. run rake db:migrate Once you run the db:migrate command, rails will create ...