diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-05-31 14:27:17 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-31 20:27:17 +0200 |
commit | d6774d2ca39b66ba6a80e707dbd58a6b391ee274 (patch) | |
tree | ee2d1d5f5de480bf9eecca5815f314ee17019395 /app/controllers/api/v1/timelines/base_controller.rb | |
parent | bd669e390743f98eb8bc777a8a9d01980b7b44b4 (diff) |
Refactor and spec coverage for api/v1/timelines actions (#3482)
Diffstat (limited to 'app/controllers/api/v1/timelines/base_controller.rb')
-rw-r--r-- | app/controllers/api/v1/timelines/base_controller.rb | 30 |
1 files changed, 0 insertions, 30 deletions
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 |