4
Contributors
8
Replies
9
Views
10 Years
Discussion Span
Last Post by aoooddy
0

can anybody tell me how to get the values from querystring.

thanx in advance to all..

params[:param_name]

So say for example you're using pagination and you want the page_number param list?page_number=1 :

params[:page_number]
0

thanx pty for quick reply,

but if i have suppose 7 parameters in query string and i want to access the value for all 7 parameters in one go, how can i do that..

0

thanx pty for quick reply,

but if i have suppose 7 parameters in query string and i want to access the value for all 7 parameters in one go, how can i do that..

The params are in a hash (eg {"action"=>"list", "filter"=>"closed", "controller"=>"issue"} . If you want to iterate through them for example use:

params.each do |key, value|
  #do something fancy!
end
0

hi pty,

is there any special function to retrive the complete query string path,i have read from manual that this function is used to retrieve complete string,
ENV,but i am not able to get it working.

0

thanx gary for your reply but i want to know that ,do i need to install or include some file to get it working as its not working if i only add this line of code only.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.