I have a people controller, and want to import bulk import multiple
people from a CSV file.
In my routes.rb file I have:
Now, it’s a little unclear to me how to further configure the routes to
allow me to add the following URLs:
I need a URL to choose a file to upload, so I need an HTML ‘frontend’
for it, so I figured the following URL fits into the REST/CRUD paradigm:
/people;bulk_import (using a GET method)
Once I have picked my CSV file, I need to do a POST to perform the
actual bulk import.
Here I was thinking of either:
/people/;bulk_import (using a POST method)
/people/bulk_import (using a POST method).
I’m getting a bit confused on how to think about this ‘new’ REST/CRUD
paradigm, especially in terms of URLs, and then using the simply_restful
plugin to manage the named routes.
Can somebody clear this up for me before my head explodes.