views:

26

answers:

1

How can I map both Users and Things to root - so '/myname' and '/friendly-url-slug-for-a-thing' finds their objectives and the url_for helpers work as expected?

A: 

With something this exceptional, I think the best best is to simply spell out the routes. The :as directive will allow you to rename something, but the name cannot be blank.

Omitting the prefix will require routes such as /new and / to accept POST for creating new users.

tadman
Thanks. Do you know if I can generate custom url_for paths that point to the ommitted prefix link?
Newy
map.connect creates an un-named route. map.name creates name_path and name_url methods for you, so simply name them as required.
tadman