# routes.rb question

**URL:** <https://discuss.rubyonrails.org/t/routes-rb-question/38111>\
**Category:** rubyonrails-talk\
**Created:** [January 9, 2009, 1:06am UTC](https://discuss.rubyonrails.org/t/routes-rb-question/38111 "2009-01-09T01:06:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [January 9, 2009, 1:06am UTC](https://discuss.rubyonrails.org/t/routes-rb-question/38111/1 "2009-01-09T01:06:14Z")

</div>

I'm trying to go to localhost/phrases/new

where 'phrases' is my controller and 'new' is my action which will simply show my new.html.erb

In my routes i have: &nbsp;&nbsp;map.connect '/:controller/:action'

Yet every time i go to phrases/new, I get redirected to my show action

[http://pastie.org/356249](http://pastie.org/356249)

I can get around this if i use: &nbsp;&nbsp;map.connect '/:controller/:action.'

But i find it distasteful to have that period at the end of my URL. Any clue why everything gets redirected to :action =\> 'show'

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [January 9, 2009, 4:29am UTC](https://discuss.rubyonrails.org/t/routes-rb-question/38111/2 "2009-01-09T04:29:33Z")

</div>

Richard,

Why not just lose this line from your routes file:

map.connect '/:controller/:action'

Since map.resources came along, I always delete the default stuff that comes in the routes file. See if /phrases/new works the way it should after removing that line.

-- Josh [http://iammrjoshua.com](http://iammrjoshua.com)

Richard Schneeman wrote:

---

<div class="post-metadata">

**Author:** ![Bob\_Martens](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@Bob\_Martens](https://discuss.rubyonrails.org/u/Bob_Martens)\
**Post date:** [January 9, 2009, 5:28am UTC](https://discuss.rubyonrails.org/t/routes-rb-question/38111/3 "2009-01-09T05:28:32Z")

</div>

Try what was recommended and what does your controller look like?
