# Routes.rb -- is it really needed?

**URL:** <https://www.ruby-forum.com/t/routes-rb-is-it-really-needed/171381>\
**Category:** Rails\
**Created:** [July 1, 2009, 1:21pm UTC](https://www.ruby-forum.com/t/routes-rb-is-it-really-needed/171381 "2009-07-01T13:21:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![awfreeman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@awfreeman](https://www.ruby-forum.com/u/awfreeman)\
**Post date:** [July 1, 2009, 1:21pm UTC](https://www.ruby-forum.com/t/routes-rb-is-it-really-needed/171381/1 "2009-07-01T13:21:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![awfreeman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@awfreeman](https://www.ruby-forum.com/u/awfreeman)\
**Post date:** [July 1, 2009, 6:26pm UTC](https://www.ruby-forum.com/t/routes-rb-is-it-really-needed/171381/2 "2009-07-01T18:26:17Z")

</div>

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](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![awfreeman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@awfreeman](https://www.ruby-forum.com/u/awfreeman)\
**Post date:** [July 1, 2009, 2:20pm UTC](https://www.ruby-forum.com/t/routes-rb-is-it-really-needed/171381/3 "2009-07-01T14:20:39Z")

</div>

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