params used in the link in Rails
I am having a doubt in ROR. I am having a code .I am trying to study the code given .There i m having a api folder with in tat i am having a files .. In one of the file There is a index action of the controller file there are params like params[:limit] and params[:sort].. I wanna to check of ho开发者_如何学JAVAw the link works frm api ..
i tried it using localhost:3000/api/abc.xml
this lists all the posts under abc...
But in that i am having the params for limit and sort.. How can i use them in the links
how to give the parameters in the Url to check the limit and sort by parameters
The first thing to try would be:
http://localhost:3000/api/abc.xml?limit=X&sort=Y
精彩评论