diff --git a/lib/jsonapi/utils/response/formatters.rb b/lib/jsonapi/utils/response/formatters.rb index c46641c..961e9fa 100644 --- a/lib/jsonapi/utils/response/formatters.rb +++ b/lib/jsonapi/utils/response/formatters.rb @@ -186,6 +186,8 @@ def turn_into_resource(record, options) # @api private def result_options(records, options) {}.tap do |data| + data[:meta] = options.fetch(:meta, {}) + if JSONAPI.configuration.default_paginator != :none && JSONAPI.configuration.top_level_links_include_pagination data[:pagination_params] = pagination_params(records, options)