Routes.rb -- is it really needed?

Has anyone recently thought about just merging routing into the
controller? ActiveRecord handles associations very well. It seems
like the controller should be able to handle its own associations just
as well.

Andy

Andy F. wrote:

Has anyone recently thought about just merging routing into the
controller?

RESTful routing is not the only type of routing that Rails supports. You
can also do custom routes with completely arbitrary names. In those
cases, if there were no routes.rb, Rails wouldn’t even know which
controller to call!

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Routing is not just controller associations. Routes can be also
applied to models and globally across multiple scopes.