diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-04-10 15:27:03 -0400 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-10 21:27:03 +0200 |
commit | dbe9f33fdc9a995b07ff3b1dcd93ad02cd336649 (patch) | |
tree | d89768083aba71c27789dfb08651ef27811954cf /app/controllers/admin/pubsubhubbub_controller.rb | |
parent | 1be6aa0c7fdac51e81ff7ee0c2b9184ed29ca3de (diff) |
Admin base controller (#1465)
* Add Admin::BaseController to wrap admin area Extracts the setting of the `admin` layout and verifying that users are admins to a common base class for the admin/ controllers. * Add basic coverage for admin/reports and admin/settings controllers
Diffstat (limited to 'app/controllers/admin/pubsubhubbub_controller.rb')
-rw-r--r-- | app/controllers/admin/pubsubhubbub_controller.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/controllers/admin/pubsubhubbub_controller.rb b/app/controllers/admin/pubsubhubbub_controller.rb index b9e840ffe..95f79c520 100644 --- a/app/controllers/admin/pubsubhubbub_controller.rb +++ b/app/controllers/admin/pubsubhubbub_controller.rb @@ -1,11 +1,9 @@ # frozen_string_literal: true -class Admin::PubsubhubbubController < ApplicationController - before_action :require_admin! - - layout 'admin' - - def index - @subscriptions = Subscription.order('id desc').includes(:account).paginate(page: params[:page], per_page: 40) +module Admin + class PubsubhubbubController < BaseController + def index + @subscriptions = Subscription.order('id desc').includes(:account).paginate(page: params[:page], per_page: 40) + end end end |