# Error using named routes with resource routes?

**URL:** <https://www.ruby-forum.com/t/error-using-named-routes-with-resource-routes/178627>\
**Category:** Rails\
**Created:** [November 8, 2009, 9:46am UTC](https://www.ruby-forum.com/t/error-using-named-routes-with-resource-routes/178627 "2009-11-08T09:46:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [November 8, 2009, 9:46am UTC](https://www.ruby-forum.com/t/error-using-named-routes-with-resource-routes/178627/1 "2009-11-08T09:46:36Z")

</div>

I have a simple app – essentially just restful\_authentication at this  
point. I have the following in my routes.rb:

map.resources :attendees  
map.resource :sessions

# nice named routes

map.signup ‘/signup’, :controller =\> ‘attendees’, :action =\>  
‘new’  
map.login ‘/login’, :controller =\> ‘sessions’, :action =\> ‘new’  
map.logout ‘/logout’, :controller =\> ‘sessions’, :action =\>  
‘destroy’  
map.activate ‘/activate/:activation\_code’, :controller =\>  
‘attendees’, :action =\> ‘activate’

My tests all work OK, and functionally this seems to be working…I  
can signup, activate, log in and log out.

When I use the named routes I created (eg localhost/signup) I do get  
the correct page routed, but I also get an error in the log:

/!\ FAILSAFE /!\ Sat Nov 07 17:09:34 -0800 2009  
Status: 500 Internal Server Error  
PROPFIND, accepted HTTP methods are get, head, put, post, delete,  
and options  
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/  
action\_controller/request.rb:35:in `request\_method’  
(etc)

I don’t get that if I use the resource route (/attendees/new).

The easy solution is not to use named routes I guess, but I’d rather  
keep a few clean/sparse routes for embedding in emails. I’m assuming  
this is some conflict with rest routes and named routes…but that’s  
just speculation.

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [November 9, 2009, 1:06am UTC](https://www.ruby-forum.com/t/error-using-named-routes-with-resource-routes/178627/2 "2009-11-09T01:06:05Z")

</div>

Does anyone know why my named routes are using a propfind method  
instead of get? I know I can add this to the verbs that webrick (and  
mongrel) understand, but since this is unexpected behavior I’d rather  
fix it properly.

Joe

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [November 9, 2009, 7:13am UTC](https://www.ruby-forum.com/t/error-using-named-routes-with-resource-routes/178627/3 "2009-11-09T07:13:36Z")

</div>

Hi Joe

> map.resource :sessions

```
Dont know about the error But is it

```

map.resource :sessions or  
map.resource :session ?

Sijo

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [November 9, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/error-using-named-routes-with-resource-routes/178627/4 "2009-11-09T15:27:45Z")

</div>

On Nov 7, 8:35 pm, Joe [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> map.logout ‘/logout’, :controller =\> ‘sessions’, :action =\>  
> /!\ FAILSAFE /!\ Sat Nov 07 17:09:34 -0800 2009  
> Status: 500 Internal Server Error  
> PROPFIND, accepted HTTP methods are get, head, put, post, delete,  
> and options  
> C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/  
> action\_controller/request.rb:35:in `request\_method’  
> (etc)

What this is is Frontpage drool. IE has a habit of trying to treat  
everything like a WebDAV server, which is why it’s sending a PROPFIND  
request. There’s a tutorial around someplace about routing unsupported  
methods to an error page - you may want to try that. Otherwise, it’s  
pretty much harmless.

–Matt J.

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [November 9, 2009, 3:34pm UTC](https://www.ruby-forum.com/t/error-using-named-routes-with-resource-routes/178627/5 "2009-11-09T15:34:12Z")

</div>

Thanks Matt, but in this case I’m actually using google chrome for my  
browser (I get the same error with firefox FWIW).
