Forum: Ruby on Rails more routes.rb questions!

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.
3d1a70ebd35ac970e009e01599603b46?d=identicon&s=25 koloa (Guest)
on 2007-02-19 14:35
hi, if i did this:

map.details 'food/bbq/:id' :action => 'foodDetails'

that is passing only 1 parameter


map.details ':category/:type/:id' :action => 'foodDetails'

is passing in 3 parameters correct?

now to minimize processing, i should limit the amount of parameters
passed in the url. therefore, do i just brute force my urls by writing
each one out like this?

map.bbqdetails 'food/bbq/:id' :action => 'bbqdetails'

map.grilldetails 'food/grilled/:id' :action => 'grilldetails'

map.italiandetails 'food/italian/:id' :action => 'grilldetails'

This topic is locked and can not be replied to.