Namespace as Resource ?

0 views
Skip to first unread message

haudiggn

unread,
Feb 29, 2008, 10:40:58 AM2/29/08
to resources_controller

Hi there,

I am trying to implement the following pattern with RC, but without
any luck. Maybe you have an idea, what I need to do?

I want to have the Account Pattern (e.g. /account/items) scoped to the
current_user. It is easy, when I have an AccountController and a
map.account resource in my routes.db

But what I really want to have iss a namespace named "account" so that
I can easliy seperate "accounted" controllers from normal ones, with
its associated views, tests etc. Like that:

map.namespace :account do .... where

/account/items is scoped to the current_user and the triggered
controller is
app/controllers/account/items_controller.rb ...

Normally, I would use a namespace and(!) an account controller, but
this results in other URLs like

/:namespace/account/items ...

Any Ideas ?

Regards, Alex

Reply all
Reply to author
Forward
0 new messages