Topic: Route and controller in subdirectory
I've put all my admin controller in the a subdirectory admin :
and my controller definition are
class Admin::CategoryController < ApplicationController
class Admin::ForumController < ApplicationController
I've also an admin controller in the controllers directory in order to achieve authentification :
class AdminController < ApplicationController
It work nice but I've been obliged to add these lines to my routes.rb file :
map.connect 'admin/category/:action/:id', :controller => 'admin/category'
map.connect 'admin/forum/:action/:id', :controller => 'admin/forum'
and if I use
<%= link_to "My account", :controller => "account", :action => "edit" %>
my link didn't work when I'am in the admin part (link displayed is /admin/account/edit and it should be /account/edit).
So what is wrong ? My routes.rb file ? My usage of link_to ?
Thanks a lot for your help !