# Problems with link\_to to delete a resource

**URL:** <https://www.ruby-forum.com/t/problems-with-link-to-to-delete-a-resource/181256>\
**Category:** Rails\
**Created:** [January 8, 2010, 9:52am UTC](https://www.ruby-forum.com/t/problems-with-link-to-to-delete-a-resource/181256 "2010-01-08T09:52:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeonS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c77e96/32.png) [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Post date:** [January 8, 2010, 9:52am UTC](https://www.ruby-forum.com/t/problems-with-link-to-to-delete-a-resource/181256/1 "2010-01-08T09:52:25Z")

</div>

Hi,

I’ve got Users and Mates in my RoR Application.  
A mate is a User and is descriped through a relationship.  
So, i’ve got a Users Comntroller and a Mate Controller.  
How do i link do the destroy method of the Mate Controller?  
If i try to do it like that:  
\<%= link\_to ‘Destroy’, mate, :confirm =\> ‘Are you sure?’, :method  
=\> :delete %\>  
It routes me to the Route of the User Controller, but there is no  
Destroy method and i’dont  
want to delete a User, i only want to remove the relationship.  
Where’s the problem with the link?

---

<div class="post-metadata">

**Author:** ![LeonS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c77e96/32.png) [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Post date:** [January 8, 2010, 1:21pm UTC](https://www.ruby-forum.com/t/problems-with-link-to-to-delete-a-resource/181256/2 "2010-01-08T13:21:56Z")

</div>

2010/1/8 LeonS [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hi,
> 
> I’ve got Users and Mates in my RoR Application.  
> A mate is a User and is descriped through a relationship.

How have you specified the relationship?  
Out of interest what are the fields of each object?

Colin
