From de4681b2be0b0efa1dede092445a53d4a593c140 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 31 May 2017 14:39:35 -0400 Subject: Move admin/pubsubhubbub controller to admin/subscriptions (#3442) --- app/controllers/admin/pubsubhubbub_controller.rb | 9 --------- app/controllers/admin/subscriptions_controller.rb | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 app/controllers/admin/pubsubhubbub_controller.rb create mode 100644 app/controllers/admin/subscriptions_controller.rb (limited to 'app/controllers/admin') diff --git a/app/controllers/admin/pubsubhubbub_controller.rb b/app/controllers/admin/pubsubhubbub_controller.rb deleted file mode 100644 index 2677a59e4..000000000 --- a/app/controllers/admin/pubsubhubbub_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -module Admin - class PubsubhubbubController < BaseController - def index - @subscriptions = Subscription.order(id: :desc).includes(:account).page(params[:page]) - end - end -end diff --git a/app/controllers/admin/subscriptions_controller.rb b/app/controllers/admin/subscriptions_controller.rb new file mode 100644 index 000000000..624a475a3 --- /dev/null +++ b/app/controllers/admin/subscriptions_controller.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Admin + class SubscriptionsController < BaseController + def index + @subscriptions = ordered_subscriptions.page(requested_page) + end + + private + + def ordered_subscriptions + Subscription.order(id: :desc).includes(:account) + end + + def requested_page + params[:page].to_i + end + end +end -- cgit