# Custom Route Required?

**URL:** <https://www.ruby-forum.com/t/custom-route-required/136074>\
**Category:** Rails\
**Created:** [April 28, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/custom-route-required/136074 "2008-04-28T18:41:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rory\_McKinley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Rory\_McKinley](https://www.ruby-forum.com/u/Rory_McKinley)\
**Post date:** [April 28, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/custom-route-required/136074/1 "2008-04-28T18:41:39Z")

</div>

I have a model class with the name of MilestoneProgress. The model file  
is called milestone\_progress.rb. The controller class is called  
MilestoneProgressController and is located in  
milestone\_progress\_controller.rb.

However, when I try to connect to the milestone\_progress controller, I  
get the following message:

No route matches “/milestone\_progress/create” with {:method=\>:post}.

Do I need to create a custom route for this controller? Or have I  
somehow gotten my conventions all messed up?

Ta

Rory

---

<div class="post-metadata">

**Author:** ![Rory\_McKinley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Rory\_McKinley](https://www.ruby-forum.com/u/Rory_McKinley)\
**Post date:** [April 28, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/custom-route-required/136074/2 "2008-04-28T18:59:19Z")

</div>

You added the mapping to your config/routes.rb right?

Assuming you did that you probably didn’t specify a create action in  
your controller. Unfortunately those don’t get auto generated for  
you. IMO this is a major drawback to the current resources  
implementation. There is however, a very interesting plugin[1] that  
will do this for you.

HTH,

Sean

[1]  
[http://jamesgolick.com/2007/10/19/introducing-resource\_controller-focus-on-what-makes-your-controller-special](http://jamesgolick.com/2007/10/19/introducing-resource_controller-focus-on-what-makes-your-controller-special)

---

<div class="post-metadata">

**Author:** ![Rory\_McKinley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Rory\_McKinley](https://www.ruby-forum.com/u/Rory_McKinley)\
**Post date:** [April 28, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/custom-route-required/136074/3 "2008-04-28T19:31:20Z")

</div>

schof wrote:

> You added the mapping to your config/routes.rb right?

Hi Sean

No I haven’t yet, as I wasn’t sure if it was required. So, would it be a  
good rule of thumb to assume that if I have a “double-barreled”  
controller name, I will have to create a custom route for it?

Thanks

Rory
