views:

34

answers:

1

Hi ,

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 how 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

+1  A: 

The first thing to try would be:

http://localhost:3000/api/abc.xml?limit=X&sort=Y
Shadwell
Thanks it worked for me.. For posting the blog i am not aware of checking how do i check with the post action.. For Get i tried by changing the Url and checked with the existing datas. How to check with the POST action
Aruna
If you want to simulate a post you might want to look at curl to send requests from the command line but to be honest it'd probably be just as easy to set up a form to do it rather than go down that route. Either that or write some functional tests to experiment.
Shadwell
I am having a FORM for posting the blog but the thing is i want to check out the input parameters and how the response is ?? I think i can see these post data by seeing the Firebug ->Net ->Post
Aruna