How do you render a rails partial that is outside of a namespace in a view that is inside of a namespace?

Posted by iand675 on Stack Overflow See other posts from Stack Overflow or by iand675
Published on 2010-12-31T05:47:52Z Indexed on 2010/12/31 5:54 UTC
Read the original article Hit count: 171

I've got a 'static' controller and static views that are pages that don't utilize ruby in their views. For these pages, I have a sitemap partial that is generated programatically and used in the application layout file. Namespaced routes still use the application layout file but are taking the static routes and trying to namespace them too.

Here's the relevant portion of the route file:

namespace :admin do
  resources :verse_categories
  resources :verses
  resources :songs
  resources :flowers
  resources :visits, :except => [:new, :create]
end
match ':action' => 'static'
root :to => 'static#home'

Here's the error I'm getting:

No route matches {:controller=>"admin/static", :action=>"about"}

Note that about is one of the static pages that the sitemap partial uses.

So, how can I resolve this routing issue so that it's not trying to find my static sites inside of the admin namespace? Any help would be appreciated!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about nested-routes