Ruby on Rails Tutorial is available as an ebook, an offline video series, and as a structured, self-paced online course. The course includes full online access to the book content, streaming videos, progress tracking, exercises, and community exercise answers.
The Learn Enough All Access Subscription includes the entire Learn Enough introductory sequence and the full Ruby on Rails Tutorial. More than 2500 pages of book content and 53 hours of video that teach you to code from total beginner up to professional-grade web development.
Newly updated for Rails 7, the Ruby on Rails Tutorial book and screencast series teach you how to develop and deploy real, industrial-strength web applications with Ruby on Rails, the open-source web framework that powers top websites such as GitHub, Hulu, Shopify, and Airbnb. The Ruby on Rails Tutorial book is available for purchase as an ebook (PDF, EPUB, and MOBI formats). The companion screencast series includes 14 individual lessons, one for each chapter of the Ruby on Rails Tutorial book.
Having completed account activation (and thereby verified the user’s email address) in Chapter 11, we’re now in a good position to implement password reset, and thereby handle the common case of users forgetting their passwords.1 As we’ll see, many of the steps are similar to those for account activation, and we will have several opportunities to apply the lessons learned in Chapter 11. The beginning is different, though; unlike account activation, implementing password resets requires both a change to one of our views and two new forms (to handle email and new password submission).
Before writing any code, let’s mock up the expected sequence for resetting passwords. We’ll start by adding a “forgot password” link to the sample application’s login form (Figure 12.1). The “forgot password” link will go to a page with a form that takes in an email address and sends an email containing a password reset link (Figure 12.2). The reset link will go to a form for resetting the user’s password (with confirmation), as shown in Figure 12.3.
If you followed Chapter 11, you already have a mailer for password resets, which was generated in Section 11.2 (Listing 11.6). In this section, we’ll complete the necessary preliminaries by adding a resource and data model for password resets (Section 12.1) to go along with the mailer. We’ll implement the actual password reset in Section 12.3.
In analogy with account activations, our general plan is to make a Password Resets resource, with each password reset consisting of a reset token and corresponding reset digest. The primary sequence goes like this:
The Learn Enough tutorial section you have selected is premium content. You can get full access with an ebook purchase or a course subscription. If cost is a factor, please consider applying for a Learn Enough Scholarship, which includes both free and discount options.
You can send any feedback or questions to support@learnenough.com.
Get Started Now!
Course SubscriptionsFull online version of the tutorial, embedded streaming videos for all sections, exercises with editable answers, progress tracking, and membership in the Learn Enough Society (community exercise answers, private chat group). Pause your subscription at any time!
Learn Enough offers a generous scholarship program to help out in case cost is a factor. We’ve already awarded over 1500 Learn Enough Scholarships to a wide variety of recipients, including students, people between jobs, and residents of countries with unfavorable exchange rates. Applications are quick, easy, and 100% confidential. Learn More
All Learn Enough tutorials come with a 60-day 100% money-back guarantee. If for any reason you aren’t satisfied with any tutorial purchase, just let us know and we’ll refund your payment.
Get free access to all 10 Learn Enough courses (including the Ruby on Rails Tutorial) for 7 days!
We require a credit card for security purposes, but it will not be charged during the trial period. After 7 days, you will be enrolled automatically in the monthly All Access subscription.
BUT you can cancel any time and still get the rest of the 7 days for free!
All Learn Enough tutorials come with a 60-day 100% money-back guarantee.