Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8121363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:27:57+00:00 2026-06-06T05:27:57+00:00

has_secure_password in rails works well for signing up users by checking :password and :password_confirmation

  • 0

has_secure_password in rails works well for signing up users by checking :password and :password_confirmation then logging a :password_digest field in the database. However, if I want to be able to verify the email address (by sending an email confirmation) how would I be able to do this with rails?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:28:00+00:00Added an answer on June 6, 2026 at 5:28 am

    Generally to verify an email address, you send an email to the concerned email address ( with a link ) and the user clicks a link / verifies it. The link generally contains a token used to uniquely identify that email address. So you can add a verification_token field to your model, may be add verification_email_sent_at and verified_at fields as well, to keep track and use a controller action

       def verify_email
         @user = User.find_by_verification_token(params[:verification_token])
         if @user
            @user.verification_token = nil
            @user.verification_email_sent_at = nil
            @user.verified_at = Time.now
            @user.save
            # above lines can be part of method like @user.verify!
            redirect_to "/"
         else
            ...
         end
       end
    

    Also I’d strongly suggest instead of building your authentication solution take a look at

    https://github.com/plataformatec/devise

    Its pretty simple to use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the has_secure_password way to store a secure password in the database. When
Is it possible to turn off password confirmation in bcrypt-ruby (has_secure_password) gem?
I upgraded the authentication in my application to use Rails 3.1's has_secure_password facility. In
I have a session that I gave to users that has matching password =
I've followed the guide which is excellent, however, when I add has_secure_password to my
Possible Duplicate: Best way to store password in database I have a database (mySQL)
After I set password to MySQL, phpMyAdmin is denying access to the database and
It has been discovered that several users have been uploading secured (password protected) .pdf's
I would like to know if rails 3.2.1 has the method has_secure_password ? Where
I am trying to install the new version of the twitter-bootstrap-rails gem (v2), but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.