Can someone help me please. I have a form on one page that is functioning as a search form. After I get the results on the next page I would like to be also able to read the search options selected which are in the URL of the results page. What is need for me to be able to do some conditional statements against them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
try <%= params[:id] %> On May 28, 7:28 am, Shawn B <sba...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Can someone help me please. I have a form on one page that is > functioning as a search form. After I get the results on the next page > I would like to be also able to read the search options selected which > are in the URL of the results page. What is need for me to be able to > do some conditional statements against them.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
dosen''t seem to work. this is the URL with the Paramaters that I am wanting to grab http://localhost:3000/companies?test=test&province=&building_systems=1&wood_based_panels=1 On May 28, 8:30 am, Ajit <ajitscor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> try <%= params[:id] %> > > On May 28, 7:28 am, Shawn B <sba...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Can someone help me please. I have a form on one page that is > > functioning as a search form. After I get the results on the next page > > I would like to be also able to read the search options selected which > > are in the URL of the results page. What is need for me to be able to > > do some conditional statements against them.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
what Ajit wanted to show is that all the parameters in the url are available in the params hash for an url like that> http://localhost:3000/companies?test=test&province=&building_systems=1&wood_based_panels=1you should have params[:test] containing "test" params[:province] is empty params[:building_system] containing "1" (as a string!) and so on you van use that in your controller code like if params[:building_system] == "1" then ... do something ... end or in your erb code like Ajit showed. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---