diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-04-15 10:44:59 -0400 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-15 16:44:59 +0200 |
commit | 6670e6d33fa735b6199e3b962f62ed6d1442bae1 (patch) | |
tree | cdd5aefe392f73cd456e2bf376645eea0f4a8754 /app/controllers/admin | |
parent | 9d2f55ecc3cc6bef9dc79ad8faf444261736976b (diff) |
Add password reset for users from admin accounts area (#1841)
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/resets_controller.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/controllers/admin/resets_controller.rb b/app/controllers/admin/resets_controller.rb new file mode 100644 index 000000000..6db648403 --- /dev/null +++ b/app/controllers/admin/resets_controller.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Admin + class ResetsController < BaseController + before_action :set_account + + def create + @account.user.send_reset_password_instructions + redirect_to admin_accounts_path + end + + private + + def set_account + @account = Account.find(params[:account_id]) + end + end +end |