Closed cooljacob204 closed 4 years ago
Youre using render :json - try respond_with like our sample app/quickstart
I was trying to avoid including the responders gem.
I used render jsonapi: letters
which seems to have fixed it. Would you say that this is also a correct approach?
I'm guessing it's crashing because the body did not have a meta tag.
Going to close since I am no longer running into this issue now that I respond with jsonapi.
Hey All, the results and raw sections are not displaying any data. App is returning a 200 and a json object.
Running on Rails 2.6.4 using the vandal gem. Everything looks correct to me response wise.
Request url for this example is
<my_app>/letters?page[number]=1&page[size]=10
, however all resources are not displaying.Rails code:
resource
controller:
Chrome error:
From Rails
From downloaded client in dev mode (still in chrome console)
and
network response information
Relevant response Headers:
Body (With personal data removed):
{"data":[{"id":"1","first_name":"<filler>"},{"id":"2","first_name":"<filler>"},{"id":"3","first_name":"<filler>"},{"id":"4","first_name":"<filler>"},{"id":"5","first_name":"<filler>"},{"id":"6","first_name":"<filler>"},{"id":"7","first_name":"<filler>"},{"id":"8","first_name":"<filler>"},{"id":"9","first_name":"<filler>"},{"id":"10","first_name":"<filler>"}]}