useranon
useranon

Reputation: 29514

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

Upvotes: 0

Views: 171

Answers (1)

Shadwell
Shadwell

Reputation: 34774

The first thing to try would be:

http://localhost:3000/api/abc.xml?limit=X&sort=Y

Upvotes: 1

Related Questions