I'm trying to use Trailblazer to create a JSON API backend. Unfortunately, I can't get collections to work at all. This might be a mistake on my part, but I think I've tracked it down representable (but I'm not 100% sure).
What it boils down to is that .represent() does not work in JSON API when it's handed a collection.
This works:
Author::Representer::Index.for_collection.new(Author.all).to_json
This does not work:
Author::Representer::Index.represent(Author.all).to_json
I think that should work, right?
I have created a very simple Rails application to demonstrate:
https://github.com/promisedlandt/trailblazerjsonapi