Rails 3: new namespace inside nested resource?

Adriano Nagel
2010-04-18T17:13:40Z

Hi,

Is there a way to use namespaces inside nested resources? For example,
I have:

resources :users do
  resources :tags
end

and I''d like to place the tags controller inside controllers/users,
with the equivalent for templates.

If I try this:

resources :users do
  namespace :users do
    resources :tags
  end
end

I''ll get redundant route names:

users_user_tags, users_user_utag, etc

This doesn''t work either:

resources :users do
  resources :tags, :module => :users
end

And yet, nested resources seem like a good candidate to use
namespaces, to better organize files and avoid name conflicts.

Thanks,

--
Adriano

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at