# Use of custom routings

**URL:** <https://www.ruby-forum.com/t/use-of-custom-routings/150434>\
**Category:** Rails\
**Created:** [October 8, 2008, 3:56pm UTC](https://www.ruby-forum.com/t/use-of-custom-routings/150434 "2008-10-08T15:56:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [October 8, 2008, 3:56pm UTC](https://www.ruby-forum.com/t/use-of-custom-routings/150434/1 "2008-10-08T15:56:56Z")

</div>

what is the main use of  
1)map.resources  
2)nested resources  
3)if we use only  
map.connect ‘:controller/:action/:id’  
map.connect ‘:controller/:action/:id.:format’  
in routes.rb ,then what is the drawback of that ?

can any one ?

---

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [October 8, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/use-of-custom-routings/150434/2 "2008-10-08T16:01:55Z")

</div>

On 8 Oct 2008, at 14:56, Pokkai D. wrote:

> what is the main use of  
> 1)map.resources  
> 2)nested resources  
> 3)if we use only  
> map.connect ‘:controller/:action/:id’  
> map.connect ‘:controller/:action/:id.:format’  
> in routes.rb ,then what is the drawback of that ?

> **[rails.info](http://guides.rails.info/routing/routing_outside_in.html#_restful_routing_the_rails_default)**
>
> Ruby on Rails,Rails Tutorial,Ruby Basics,Rails 4,Bar Rails,Rail

---

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [October 13, 2008, 7:02am UTC](https://www.ruby-forum.com/t/use-of-custom-routings/150434/3 "2008-10-13T07:02:13Z")

</div>

Frederick C. wrote:

> On 8 Oct 2008, at 14:56, Pokkai D. wrote:  
> [rails.info](http://guides.rails.info/routing/routing_outside_in.html#_restful_routing_the_rails_default)

nice explaination  
thanks Cheung.

---

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [October 13, 2008, 7:20am UTC](https://www.ruby-forum.com/t/use-of-custom-routings/150434/4 "2008-10-13T07:20:36Z")

</div>

Frederick C. wrote:

> On 8 Oct 2008, at 14:56, Pokkai D. wrote:
> 
> > what is the main use of  
> > [rails.info](http://guides.rails.info/routing/routing_outside_in.html#_restful_routing_the_rails_default)

i have confused a little about perfomance issue while using nested  
routing  
if i create a nested routes like this  
#---------------in routes.rb-----------------------------------------  
map.resources :countries do |country|  
country.resources :states do |state|  
state.resources :cities do |city|  
city.resources :streets, :has\_many =\>:wards  
end  
end  
end  
#--------------------------------------------------------  
will it affect performance ?  
because these routes are looking like a nested loop
