Forum: Ruby on Rails route help using accounts but not with subdomain

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.
Brent Beardsley (Guest)
on 2006-06-05 22:58
(Received via mailing list)
Hi all,

I've just started trying to figure out rails routes
and am having some difficulty.

I want to have the directory structure start with the
/:account_name/ instead of using the subdomain with
the exception of account/create and account/list

I tried:

map.connect 'account/create', :controller =>
'account', :action => 'create'
map.connect 'account/list', :controller => 'account',
:action => 'create'
map.connect ':account_name/:action', :controller =>

and in the account_controller I have a function

before_filter find_account, :except => [:create,

I seem to always get into the account/list and can
never get into the account/create.

Any ideas for the proper routes to get this to work?
(hopefully this made sense...)



Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
This topic is locked and can not be replied to.