mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Disable pagination links via config
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user