Forum: Ruby on Rails Routing 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.
Szymon N. (Guest)
on 2006-04-10 14:00

I've just found out how to make my urls prettier by specifying custom
But i have few questions:

1. How to hide controller name from the url? I.e. my site is very
simple, so all actions that user can perform are in 'content'
controller. It's easy to redirect user to content/index when he enters
just site address, but when he clicks on any link, he gets url like:
'domain/content/action'. Is it possible to hide 'content' so he will
only see 'domain/action/'?

2. I've got a 'list' action that lists all products, or if it's given a
:type parameter lists products only of a given type. There are only 3
types of products, so i check in map.connect in requirements if the type
is correct. If it's not correct it sets type to default value nil, so
all products are listed. But the wrong type parameter is still visible
in the url. Can i somehow hide it if it's not correct?
This topic is locked and can not be replied to.