Configure Restful routes for rails webservice

Hi,

I am trying to create a Rest web service in my rails application. I need
to configure urls for it as below.

localhost:3000/book/book_id/new/param1/param2/param3/param4/...

localhost:3000/book/book_id/next

localhost:3000/book/book_id/delete

I dont have a view pages for it since it returns in json format.Please
help.So what is the best way to configure these urls via routes.

why would you like to config the routes
like: /book/book_id/new/param1/param2/param3/param4/…
but not: /book/book_id/new?param1=xx&param2=xx&param3=xx ?

在 2014年4月16日星期三UTC+8下午8时39分31秒,Ruby-Forum.com User写道:

routes:
put ‘book/:id/new/*options’
url:
/book/34/new/1/2/foo/4/5
controller:
params[:id] => 34
params[:options] => [1,2,“foo”,4,5]

May be best way make a POST request?

среда, 16 апреля 2014 г., 16:39:31 UTC+4 пользователь Ruby-Forum.com
User
написал: