From 6670e6d33fa735b6199e3b962f62ed6d1442bae1 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Sat, 15 Apr 2017 10:44:59 -0400 Subject: Add password reset for users from admin accounts area (#1841) --- app/controllers/admin/resets_controller.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 app/controllers/admin/resets_controller.rb (limited to 'app/controllers/admin/resets_controller.rb') 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 -- cgit