I have a shared layout file used on a site. It contains links like:
<%= link_to("Home", { :controller => :home, :action => :index }) %>
And other general links in the header and footer, etc.
All my controllers are just in the directory app/controllers/. But I added a namespace for admins (ban users, etc.):
namespace :admin do
resources :users
end
My admin namespace is no different from the look and feel, so it uses the same layout as the rest of the site. This causes some problems, as all my calls link_toand url_formisinterpreted as, for example:
<%= link_to("Home", { :controller => "admin/home", :action => :index }) %>
, . , , link_to , admin? admin , , link_to.
, :controller link_to ?