-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination Link Do Not Outputted on JSON #1466
Comments
I tried to dig the old def initialize(resources, options = {})
@root = options[:root]
@object = resources
@serializers = resources.map do |resource|
serializer_class = options.fetch(:serializer) {
ActiveModel::Serializer.serializer_for(resource)
}
if serializer_class.nil?
fail NoSerializerError, "No serializer found for resource: #{resource.inspect}"
else
serializer_class.new(resource, options.except(:serializer))
end
end
@meta = options[:meta]
@meta_key = options[:meta_key]
end and compare it to the new def initialize(resources, options = {})
@root = options[:root]
@object = resources
@serializers = resources.map do |resource|
serializer_context_class = options.fetch(:serializer_context_class, ActiveModel::Serializer)
serializer_class = options.fetch(:serializer) { serializer_context_class.serializer_for(resource) }
if serializer_class.nil?
fail NoSerializerError, "No serializer found for resource: #{resource.inspect}"
else
serializer_class.new(resource, options.except(:serializer))
end
end
end Why there is no |
Come to this rendering page, does it means we cannot use something like |
Come to this pull request, seems the pagination documentation on |
@edwinlunando Yes, a docs PR would be great! |
request, pulled. #1472 |
Closed by #1472 |
Hi, I'm using
master
branch andJSON
adapter. I want to show pagination links, this is my pagination serializer.This is my render code
There no
meta
key on the result. This happens after upgrading from 0.10.RC3 to master. Any idea?The text was updated successfully, but these errors were encountered: