Routing questions


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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs