# Problem with :action =\> 'destroy' in url\_for

**URL:** <https://www.ruby-forum.com/t/problem-with-action-destroy-in-url-for/137776>\
**Category:** Rails\
**Created:** [May 16, 2008, 8:54am UTC](https://www.ruby-forum.com/t/problem-with-action-destroy-in-url-for/137776 "2008-05-16T08:54:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmoroz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/97f17d/32.png) [@vmoroz](https://www.ruby-forum.com/u/vmoroz)\
**Post date:** [May 16, 2008, 8:54am UTC](https://www.ruby-forum.com/t/problem-with-action-destroy-in-url-for/137776/1 "2008-05-16T08:54:31Z")

</div>

url\_for( :controller =\> ‘foo’, :action =\> ‘destroy’, :id =\> 1 ) =\> ‘/  
foo/1’  
url\_for( :controller =\> ‘foo’, :action =\> ‘destroy\_x’, :id =\> 1 ) =\> '/  
foo/destroy\_x/1  
url\_for( :controller =\> ‘foo’, :action =\> ‘destroy’, :foo\_id =\> 1 ) =\>  
‘/foo/destroy/?foo\_id=1’

Anybody knows what happens? No REST routes defined.
