# Help with Delete

**URL:** <https://www.ruby-forum.com/t/help-with-delete/125567>\
**Category:** Rails\
**Created:** [January 10, 2008, 8:54am UTC](https://www.ruby-forum.com/t/help-with-delete/125567 "2008-01-10T08:54:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [January 10, 2008, 8:54am UTC](https://www.ruby-forum.com/t/help-with-delete/125567/1 "2008-01-10T08:54:58Z")

</div>

I have this code in rp\_parts controller in def destroy:

```
@repair_ticket.rp_parts.delete(@rp_part)

```

repair\_tickets and rp\_parts are HABTM.

If I do in the console:

> > repair\_ticket1.rp\_parts  
> > I get:  
> > =\> [#\<RpPart id: 1, …"\>, #\<RpPart id: 1,…"\>, #\<RpPart …"\>]

I only want to delete one of those RpPart id:1, and not both of them. Is  
it possible?
