From 723f25a9999251b0c3f45c57aa88afa83f315b2d Mon Sep 17 00:00:00 2001 From: Ash Furrow Date: Sun, 23 Apr 2017 04:43:42 +0200 Subject: Admin UI for confirming users (#2245) * Shows confirmed status in list. * Adds ability to confirm users in admin UI. * Added new english translations. * Addresses feedback from #2245. * More feedback. --- app/controllers/admin/confirmations_controller.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 app/controllers/admin/confirmations_controller.rb (limited to 'app/controllers') diff --git a/app/controllers/admin/confirmations_controller.rb b/app/controllers/admin/confirmations_controller.rb new file mode 100644 index 000000000..6c41999e0 --- /dev/null +++ b/app/controllers/admin/confirmations_controller.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Admin + class ConfirmationsController < BaseController + before_action :set_account + + def create + @account.user.confirm + redirect_to admin_accounts_path + end + + private + + def set_account + @account = Account.find(params[:account_id]) + end + end +end -- cgit