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.

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.

– Posted via http://www.ruby-forum.com/.

but not: /book/book_id/new?param1=xx&param2=xx&param3=xx ?

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

why would you like to config the routes like: /book/book_id/new/param1/param2/param3/param4/…

routes:

url:

controller:

params[:id] => 34

params[:options] => [1,2,“foo”,4,5]

May be best way make a POST request?