Open bricesanchez opened 8 years ago
If you'll tell me what's expected output I can help you here.
I would like the same feature of the CMS
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.