-2

I want to separate model view controllers in HMVC form including routes.After reading i found that ruby on rails does not support HMVC structure.Is there any alternative of doing it?. I also want to separate routes module wise. Please suggest some best ways of doing it as keeping everything in one place is hard to manage.Thanks in advance.

Sachin Prasad
  • 5,365
  • 12
  • 54
  • 101

2 Answers2

3

Inside your app, with Controller Namespaces and Routing you can organize in subfolders inside the main MVC structure subsystems of your application. With David's patch to Routing you can split up a big routes.rb file.

If you prefer to extract "applications" from your main app, and mount them in the router, Rails::Engine is the way to go.

TuteC
  • 4,342
  • 30
  • 40
2

You can use nested routes: rails guide http://guides.rubyonrails.org/routing.html

Rubyman
  • 874
  • 6
  • 15