# Noobish URI Question

**URL:** <https://www.ruby-forum.com/t/noobish-uri-question/57500>\
**Category:** Rails\
**Created:** [April 11, 2006, 3:45pm UTC](https://www.ruby-forum.com/t/noobish-uri-question/57500 "2006-04-11T15:45:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thebarge](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b38774/32.png) [@thebarge](https://www.ruby-forum.com/u/thebarge)\
**Post date:** [April 11, 2006, 3:45pm UTC](https://www.ruby-forum.com/t/noobish-uri-question/57500/1 "2006-04-11T15:45:43Z")

</div>

Sorry if the answer has been posted but the search terms (like URI) are  
so generic I get tons of useless results.

I have a controller (in this case “forum\_controller”) so if I want to  
read a forum topic the URI is “/forum/topic/1”. As of right now for  
adding a new topic my URI is setup as “/forum/new\_topic”.

I’d really like it to be something like “/forum/topic/new”. Is there  
some method naming convention in the controller to allow for this?

---

<div class="post-metadata">

**Author:** ![thebarge](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b38774/32.png) [@thebarge](https://www.ruby-forum.com/u/thebarge)\
**Post date:** [April 11, 2006, 4:00pm UTC](https://www.ruby-forum.com/t/noobish-uri-question/57500/2 "2006-04-11T16:00:15Z")

</div>

you could do this with routing I presume …

you’ll get something like

map.connect “forum/topic/new”,  
:controller =\> “forum”,  
:action =\> “new\_topic”

Kind regards,  
Jeroen

---

<div class="post-metadata">

**Author:** ![thebarge](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b38774/32.png) [@thebarge](https://www.ruby-forum.com/u/thebarge)\
**Post date:** [April 11, 2006, 4:07pm UTC](https://www.ruby-forum.com/t/noobish-uri-question/57500/3 "2006-04-11T16:07:38Z")

</div>

Jeroen van Doorn wrote:

> you could do this with routing I presume …
> 
> you’ll get something like
> 
> map.connect “forum/topic/new”,  
> :controller =\> “forum”,  
> :action =\> “new\_topic”
> 
> Kind regards,  
> Jeroen

Yeah, I was hoping I could do something like name the method topic::new  
or something similar but that didn’t work. I’ll just leave it as  
new\_topic for now instead of creating custom routes for each instance.
