Desired URLs:
/accounts/rando-inc # edit, update (normal "edit" function provided at whats usually "show")
/tokens # new, create, destroy (normal crud)
/billing # edit, update (singleton crud)
Attempt using scopes and macros:
scope '/accounts/:permalink',
:as => :account,
:controller => :accounts,
:constraints => { :permalink => PERMALINK_REGEX } do
get '/', :action => :edit, :as => :edit
put '/', :action => :update
scope '/:permalink',
:controller => :authentication_tokens,
:as => :token do
get :index
post :create
delete :destroy
end
end