I'm using this Rails Guide to create a scope in order to create an "/admin" prefix for some controllers.
So I have a controller named Pages, I want to access it via "/admin/pages".
scope "/admin" do
resources :pages
end
That works great, but it is still accessible via "/pages" ... How do I prevent that? (I'm using Rails 3)
Here's my routes file:
devise_for :users
scope "/admin" do
resources :pages
resources :contents
end
root :to => "index#index"
match ':controller(/:action(/:id(.:format)))'