From d6774d2ca39b66ba6a80e707dbd58a6b391ee274 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 31 May 2017 14:27:17 -0400 Subject: Refactor and spec coverage for api/v1/timelines actions (#3482) --- .../api/v1/timelines/base_controller.rb | 30 ---------------------- 1 file changed, 30 deletions(-) delete mode 100644 app/controllers/api/v1/timelines/base_controller.rb (limited to 'app/controllers/api/v1/timelines/base_controller.rb') diff --git a/app/controllers/api/v1/timelines/base_controller.rb b/app/controllers/api/v1/timelines/base_controller.rb deleted file mode 100644 index 4eb29e74a..000000000 --- a/app/controllers/api/v1/timelines/base_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -module Api::V1::Timelines - class BaseController < ApiController - respond_to :json - after_action :insert_pagination_headers, unless: -> { @statuses.empty? } - - private - - def cache_collection(raw) - super(raw, Status) - end - - def pagination_params(core_params) - params.permit(:local, :limit).merge(core_params) - end - - def insert_pagination_headers - set_pagination_headers(next_path, prev_path) - end - - def next_path - raise 'Override in child controllers' - end - - def prev_path - raise 'Override in child controllers' - end - end -end -- cgit