Dear list,
Is it currently possible to use namespaces inside a resources block?
For example:
map.resources :projects do |projects|
projects.resources :tasks
projects.namespace :wiki do |wiki|
wiki.resources :pages
end
end
This should generate URLs as "project/:project_id/wiki/
pages/:page_id". I think in this way functionality will become better
seperated and thus the app becomes better maintainable.
I know this does not work and was wondering what will. Currently I am
using:
projects.resources :pages, :controller => "Wiki::Pages",
:path_prefix
=> "/projects/:project_id/wiki", :name_prefix =>
"project_wiki_"
This sort of works but my RSpec tests now throw RoutingErrors,
needless to say this is also very unbecoming.
Thanks in advance,
Harm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---