0

I have an intranet application with several modules, I want them to separate when routing. For example:

 http://intranet/calendar/...
 http://intranet/site_admin/...
 http://intranet/tasks/...

Each of module can have many or single controller. How to write such routes?

totocaster
  • 6,243
  • 5
  • 37
  • 46

2 Answers2

2

You can try using namespaces:

map.namespace :calendar do |calendar|
  calendar.resources :first_controller
  calendar.resources :second_controller
end

And so on. Very often people put admin part of application in admin namespace (look here). Try google "rails namespace".

Community
  • 1
  • 1
klew
  • 14,837
  • 7
  • 47
  • 59
0

Also if you may want to upgrade to the latest version i.e Rails 2.3. And build those modules as separate 'Engines'. http://railscasts.com/episodes/149-rails-engines