Forum: Ruby on Rails How do I pass a variable to a query in a url (noob question)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B455036ffc83a268f77a7561f20a7ab6?d=identicon&s=25 lyntaff (Guest)
on 2007-06-19 18:30
(Received via mailing list)
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

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

C09e09e728991d8e97219de099d7dc71?d=identicon&s=25 (Guest)
on 2007-06-20 16:42
(Received via mailing list)
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.
This topic is locked and can not be replied to.