Disable pagination links via config

This commit is contained in:
Lee Richmond
2016-09-06 13:28:09 -04:00
parent 050060478d
commit 19b5abf66e
4 changed files with 21 additions and 3 deletions

View File

@@ -52,7 +52,8 @@ module ActiveModel
# rubocop:enable Metrics/CyclomaticComplexity
def paginated?
object.respond_to?(:current_page) &&
ActiveModelSerializers.config.jsonapi_pagination_links_enabled &&
object.respond_to?(:current_page) &&
object.respond_to?(:total_pages) &&
object.respond_to?(:size)
end

View File

@@ -22,6 +22,7 @@ module ActiveModel
config.default_includes = '*'
config.adapter = :attributes
config.key_transform = nil
config.jsonapi_pagination_links_enabled = true
config.jsonapi_resource_type = :plural
config.jsonapi_namespace_separator = '-'.freeze
config.jsonapi_version = '1.0'