Route help using accounts but not with subdomain


#1

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 =>
‘account’

and in the account_controller I have a function

before_filter find_account, :except => [:create,
:list]

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…)

Thanks,

Brent


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com