# Restful Named Routes

**URL:** <https://www.ruby-forum.com/t/restful-named-routes/107468>\
**Category:** Rails\
**Created:** [June 22, 2007, 1:22am UTC](https://www.ruby-forum.com/t/restful-named-routes/107468 "2007-06-22T01:22:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 22, 2007, 1:22am UTC](https://www.ruby-forum.com/t/restful-named-routes/107468/1 "2007-06-22T01:22:01Z")

</div>

Hi, I was trying to follow this tutorial,  
[http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu](http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu), but I’m having  
trouble with the mugshots\_path route in the upload form:

\<% form\_for(:mugshot, :url =\> mugshots\_path,  
:html =\> { :multipart =\> true }) do |f| -%\>

I was wondering what the proper named route should be

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 22, 2007, 8:25am UTC](https://www.ruby-forum.com/t/restful-named-routes/107468/2 "2007-06-22T08:25:02Z")

</div>

danman wrote:

> Hi, I was trying to follow this tutorial,  
> [http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu](http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu), but I’m having  
> trouble with the mugshots\_path route in the upload form:
> 
> \<% form\_for(:mugshot, :url =\> mugshots\_path,  
> :html =\> { :multipart =\> true }) do |f| -%\>
> 
> I was wondering what the proper named route should be

Hi,

Have you defined:  
map.resources :mugshots  
in your routes.rb?

Jean-Etienne

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 22, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/restful-named-routes/107468/3 "2007-06-22T19:48:58Z")

</div>

Yes, I did.  
I’m asking because I keep getting the error message “uninitialized  
constant MugshotsController” when I submit a file
