You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because you expect @resource in template, but only array of @resources is defined in controller.
I'm not sure how to handle this in returned views, but now you're returning only last image for example hence multiple images was created. Images works only because @image is defined in controller.
Probably you'll need to use separate views for show and create (just array of show view) to return list of created resources for create action.
The text was updated successfully, but these errors were encountered:
But what does it mean? In refinery when you create resource you're redirected to resources list. But here in API you can create multiple resources, so I think it will make sense to return array of all created resources in JSON. Same stands for images. WDYT?
First step is to be able to create 1 resource with the API but if we can directly handle multiple resources, it will be great. So it make sense to return an array.
Feel free to provide a PR, i love to merge them :D
A message from @simi:
Hello @bricesanchez!
This is because you expect
@resource
in template, but only array of@resources
is defined in controller.I'm not sure how to handle this in returned views, but now you're returning only last image for example hence multiple images was created. Images works only because
@image
is defined in controller.Probably you'll need to use separate views for show and create (just array of show view) to return list of created resources for create action.
The text was updated successfully, but these errors were encountered: