Commit f965f382ddfe8147a4a382ff61c27a98fdf3bd85
1 parent
42dc2058
Exists in
master
and in
1 other branch
Fixed password reset email, added html template. Fixed typos.
Showing
5 changed files
with
32 additions
and
13 deletions
Show diff stats
app/mailers/mailer.rb
| ... | ... | @@ -9,21 +9,16 @@ class Mailer < ActionMailer::Base |
| 9 | 9 | @notice = notice |
| 10 | 10 | @app = notice.err.app |
| 11 | 11 | |
| 12 | - mail({ | |
| 13 | - :to => @app.notification_recipients, | |
| 14 | - :subject => "[#{@app.name}][#{@notice.err.environment}] #{@notice.err.message}" | |
| 15 | - }) | |
| 12 | + mail :to => @app.notification_recipients, | |
| 13 | + :subject => "[#{@app.name}][#{@notice.err.environment}] #{@notice.err.message}" | |
| 16 | 14 | end |
| 17 | 15 | |
| 18 | 16 | def deploy_notification(deploy) |
| 19 | 17 | @deploy = deploy |
| 20 | 18 | @app = deploy.app |
| 21 | 19 | |
| 22 | - mail({ | |
| 23 | - :to => @app.notification_recipients, | |
| 24 | - :subject => "[#{@app.name}] Deployed to #{@deploy.environment} by #{@deploy.username}" | |
| 25 | - }) | |
| 20 | + mail :to => @app.notification_recipients, | |
| 21 | + :subject => "[#{@app.name}] Deployed to #{@deploy.environment} by #{@deploy.username}" | |
| 26 | 22 | end |
| 27 | - | |
| 28 | 23 | end |
| 29 | 24 | ... | ... |
app/views/devise/mailer/reset_password_instructions.html.haml
0 → 100644
| ... | ... | @@ -0,0 +1,21 @@ |
| 1 | +%tr | |
| 2 | + %td.section | |
| 3 | + %table(cellpadding="0" cellspacing="0" border="0" align="left") | |
| 4 | + %tbody | |
| 5 | + %tr | |
| 6 | + %td.content(valign="top") | |
| 7 | + %div | |
| 8 | + %p | |
| 9 | + Hello, | |
| 10 | + %p | |
| 11 | + We hear you'd like to change your password. You can do that by visiting the link below: | |
| 12 | + %p | |
| 13 | + = edit_password_url @resource, :reset_password_token => @resource.reset_password_token | |
| 14 | + %tr | |
| 15 | + %td.content(valign="top") | |
| 16 | + %div | |
| 17 | + %p | |
| 18 | + If you didn't request this, please ignore this email. | |
| 19 | + %p | |
| 20 | + Your password won't change unless you click the link above and set a new one. | |
| 21 | + | ... | ... |
app/views/devise/mailer/reset_password_instructions.text.erb
| 1 | 1 | Hello, |
| 2 | 2 | |
| 3 | -We hear you'd link to change your password. You can do that by visiting the link below. | |
| 3 | +We hear you'd like to change your password. You can do that by visiting the link below: | |
| 4 | 4 | |
| 5 | 5 | <%= edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %> |
| 6 | 6 | |
| 7 | 7 | If you didn't request this, please ignore this email. Your password won't change unless you access the link above and create a new one. |
| 8 | 8 | |
| 9 | -<%= render 'mailer/signature' %> | |
| 10 | 9 | \ No newline at end of file | ... | ... |
app/views/devise/passwords/edit.html.haml
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | = f.label :password, 'New password' |
| 8 | 8 | = f.password_field :password |
| 9 | 9 | .required |
| 10 | - = f.label :password_confirmation, 'One more time' | |
| 10 | + = f.label :password_confirmation, 'Type your new password again' | |
| 11 | 11 | = f.password_field :password_confirmation |
| 12 | - %div.buttons= f.submit "Change my password" | |
| 13 | 12 | \ No newline at end of file |
| 13 | + %div.buttons= f.submit "Change my password" | |
| 14 | + | ... | ... |
config/application.rb
| ... | ... | @@ -56,6 +56,9 @@ module Errbit |
| 56 | 56 | |
| 57 | 57 | # Configure sensitive parameters which will be filtered from the log file. |
| 58 | 58 | config.filter_parameters += [:password] |
| 59 | + | |
| 60 | + # Configure Devise mailer to use our mailer layout. | |
| 61 | + config.to_prepare { Devise::Mailer.layout "mailer" } | |
| 59 | 62 | end |
| 60 | 63 | end |
| 61 | 64 | ... | ... |