Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password Reset throw Devise::Models::Recoverable #96

Merged
merged 8 commits into from Jul 25, 2018

Conversation

codeauslander
Copy link
Contributor

Attempt to implement the password reset throw the devise gem
devise docs
issue 91

I am receiving a message on my console that says an email had been sent to the email of the user with the link to reset the password.

which will be this view devise/mailer/reset_password_instructions.html.erb

`
Rendering devise/mailer/reset_password_instructions.html.erb
Rendered devise/mailer/reset_password_instructions.html.erb (4.5ms)
Devise::Mailer#reset_password_instructions: processed outbound mail in 197.0ms
Sent mail to cesar.gusto.catano@gmail.com (8.0ms)
Date: Wed, 30 May 2018 23:46:29 -0500
From: please-change-me-at-config-initializers-devise@example.com
Reply-To: please-change-me-at-config-initializers-devise@example.com
To: cesar.gusto.catano@gmail.com
Message-ID: <5b0f7e2548717_d673fe7c2cbf3b0529f6>
Subject: Reset password instructions
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit

Hello cesar.gusto.catano@gmail.com!

Someone has requested a link to change your password. You can do this through the link below.

Change my password

If you didn't request this, please ignore this email.

Your password won't change until you access the link above and create a new one.

Rendered shared/_header.html.erb (932.8ms)
Completed 200 OK in 1544ms (Views: 1516.9ms | ActiveRecord: 7.1ms)

`

@coveralls
Copy link

coveralls commented May 31, 2018

Pull Request Test Coverage Report for Build 225

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.143%

Totals Coverage Status
Change from base Build 221: 0.0%
Covered Lines: 102
Relevant Lines: 105

💛 - Coveralls

@vkoves vkoves self-requested a review June 6, 2018 01:58
@vkoves vkoves self-assigned this Jun 6, 2018
@codeauslander
Copy link
Contributor Author

codeauslander commented Jun 6, 2018

screen shot 2018-06-05 at 8 52 54 pm

This is an example of email notification to reset password in the app.

Copy link
Contributor

@vkoves vkoves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally and was able to reset my password, so great work! I have added a few minor comments. I think overall we need to take a second pass at the Sign In/Sign Up styling, but that's not related to this work really.


</div>
<br />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<br> shouldn't be used for spacing. Use it for a new line in a sentence, poem, etc. Margins would be better here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

ActionMailer::Base.smtp_settings = {
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'yourdomain.com',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is separately specified in the development and production environments, can this line be removed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@@ -51,4 +51,7 @@
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker

config.action_mailer.default_url_options = { host: 'localhost:3000' }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you also add this line to the test environment config? I don't know much about this, but I don't know what would happen now if we tested email sending

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copy link
Contributor

@vkoves vkoves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@vkoves vkoves merged commit 48efaad into TransitTalk:master Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants