+2  A: 

have you tried looking at the routes list that "rake routes" gives you? if your routes.rb is correct, it should show you the correct name for the blog entries route.

also, maybe this can help: http://www.coreywoodcox.com/2008/08/18/rails-namespaces-subdomains/.

edit:

well, then the correct way to call the route is admin_blog_entries_path instead of blog_entries_path.

Maximiliano Guzman
OK, I posted them.
nlaq
+1  A: 

Your routes.rb should look like this:

map.namespace :admin do |admin|
  admin.namespace :blog do |blog|
    blog.resources :entries
    blog.resources :categories
    ...
  end
end

but I'm not sure how to handle this '/blog/' part in your url (I didn't use any namespace in my models yet). But with these routes you will be able to use:

admin_blog_categories_path               => '/admin/blog/categiries'
admin_blog_category_path(@some_category) => '/admin/blog/categories/1'

and so on.

klew
A: 

I know exactly the problem you are having. The magic generation of routes does not like it if you have namespaced your models. Did you get a solution to this form anywhere. At the moment it looks like I may need to decorate some classes!

Danny Hawkins
A: 

OK, here my rather hacky way of doing it, which I don't like but does work.

In my case I have the models Blog::Article, Blog::Comment, they are nested in the routes. One caveat if using this approach is in the Blog::CommentsController when loading the article you can expect params[:article_id] or params[:blog_article_id]. By no means nice, but like I said. It does work :/

blog.resources :articles do |article|
  article.resources :comments
end

blog.resources :blog_articles, :controller => 'articles' do |blog_article|
  blog_article.resources :blog_comments, :controller => 'comments'
end
Danny Hawkins