I am trying to implement a web service with REST API. So when I type in
the
url as localhost:3000/users/new/id/6235/name/david/age/12, I need to
access the params of id,name and age in my controller.
So params[:id] => 6235
params[:name] => david
params[:age]=> 12
How do I achieve it with proper routes configuration
I am trying to implement a web service with REST API.
I would strongly recommend that you study how the default restful
routes for a Rails-scaffolded model work first.
It would also be good to read up on the concept of REST itself and
specifically, “Section 9: Safe and Idempotent Methods” of RFC 2616
(http://www.ietf.org/rfc/rfc2616.txt).
Then decide if you really need to address your problem differently.