diff options
| author | mo khan <mo@mokhan.ca> | 2014-09-18 10:11:14 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-09-18 10:11:14 -0600 |
| commit | 47181c1901d1cbc2afc974ed60f4730a5468600c (patch) | |
| tree | 99b9c781f23650239aa167bbae141257805c1b37 /app/controllers | |
| parent | 3f346fd2b4b226a013e6dc9d3b959cf1f3a66428 (diff) | |
add action to send reset password instructions.
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/passwords_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb index 07431017..695fc10c 100644 --- a/app/controllers/passwords_controller.rb +++ b/app/controllers/passwords_controller.rb @@ -2,4 +2,9 @@ class PasswordsController < ApplicationController def new @user = User.new end + + def create + PasswordReset.send_reset_instructions_to(params[:user][:email]) + redirect_to new_session_path, notice: 'Password reset instructions have been emailed to you.' + end end |
