lyntaff
2007-Jun-19 16:29 UTC
How do I pass a variable to a query in a url (noob question)
I am a noobie to rails and have just started building my own rails project. I successfully built a simple crud admin and added all the records into a mysql database ready to build a public product catalouge. I have displayed a browse section of the application with a links of categories from the database and want have a page which displays a list of products from the appropriate category is selected. Can someone point me in the right direction? Your help will be much appreciated. LYN --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
lancecarlson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-20 14:41 UTC
Re: How do I pass a variable to a query in a url (noob question)
link_to ''Some Category'', :controller => ''categories'', :action => ''show'', :id => category There are several ways to do links now adays, especially with the introduction of RESTful routing... you should have a look at routing and buy the latest Agile Development with Rails book. On Jun 19, 12:29 pm, lyntaff <l...-XFkl2lNNjp7BrJGnFWTVgQ@public.gmane.org> wrote:> I am a noobie to rails and have just started building my own rails > project. I successfully built a simple crud admin and added all the > records into a mysql database ready to build a public product > catalouge. > > I have displayed a browse section of the application with a links of > categories from the database and want have a page which displays a > list of products from the appropriate category is selected. > > Can someone point me in the right direction? Your help will be much > appreciated. > > LYN--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---