diff options
Diffstat (limited to 'app/controllers/api/v1/trends/tags_controller.rb')
-rw-r--r-- | app/controllers/api/v1/trends/tags_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/api/v1/trends/tags_controller.rb b/app/controllers/api/v1/trends/tags_controller.rb index 329ef5ae7..38003f599 100644 --- a/app/controllers/api/v1/trends/tags_controller.rb +++ b/app/controllers/api/v1/trends/tags_controller.rb @@ -32,7 +32,7 @@ class Api::V1::Trends::TagsController < Api::BaseController end def next_path - api_v1_trends_tags_url pagination_params(offset: offset_param + limit_param(DEFAULT_TAGS_LIMIT)) + api_v1_trends_tags_url pagination_params(offset: offset_param + limit_param(DEFAULT_TAGS_LIMIT)) if records_continue? end def prev_path @@ -42,4 +42,8 @@ class Api::V1::Trends::TagsController < Api::BaseController def offset_param params[:offset].to_i end + + def records_continue? + @tags.size == limit_param(DEFAULT_TAGS_LIMIT) + end end |