# Map.resources custom url?

**URL:** <https://www.ruby-forum.com/t/map-resources-custom-url/106722>\
**Category:** Rails\
**Created:** [June 13, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/map-resources-custom-url/106722 "2007-06-13T16:34:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [June 13, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/map-resources-custom-url/106722/1 "2007-06-13T16:34:22Z")

</div>

Hey all, I have the following route which nests a has\_many :through  
association:  
map.resources :groups do |group|  
group.resources :enrollments  
end

With that I can hit urls like: /groups/1/enrollments

While this works, the url sounds rather utilitarian (probably should  
have  
thought about that when naming). Anyway, my question is, is there a  
param I  
can pass to group.resources specify a custom name for that piece in the  
url?

/groups/1/_members_

Thanks,  
Nathan

---

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [June 13, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/map-resources-custom-url/106722/2 "2007-06-13T18:20:43Z")

</div>

On 6/13/07, blinking bear [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> While this works, the url sounds rather utilitarian (probably should have  
> thought about that when naming). Anyway, my question is, is there a param I  
> can pass to group.resources specify a custom name for that piece in the url?
> 
> /groups/1/members

groups.resources :members

[http://rails.rubyonrails.org/classes/ActionController/Resources.html](http://rails.rubyonrails.org/classes/ActionController/Resources.html)

There is a :controller option if you still want to use the enrollments  
controller.

–  
Rick O.  
[http://lighthouseapp.com](http://lighthouseapp.com)  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)
