-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Hi, I'm using master branch and JSON adapter. I want to show pagination links, this is my pagination serializer.
# pagination collection serializer
class PaginationSerializer < ActiveModel::Serializer::CollectionSerializer
def initialize(object, options = {})
meta_key = options[:meta_key] || :meta
options[meta_key] ||= {}
options[meta_key][:pagination] = {
current_page: object.current_page,
next_page: object.next_page,
prev_page: object.prev_page,
total_pages: object.total_pages,
total_count: object.total_count
}
super(object, options)
end
endThis is my render code
render json: formulas, serializer: PaginationSerializer, each_serializer: FormulaSimpleSerializerThere no meta key on the result. This happens after upgrading from 0.10.RC3 to master. Any idea?