Greg Donald wrote:
> On Thu, Sep 17, 2009 at 1:54 PM, dino d. <[email protected]> wrote:
>> a.bs << b
>>
>> this creates 3 records in the join table.
>>
>> Is there any way for me to remove only one of these? �I can only seem
>> to remove all of them.
> 
> 
> This is exactly why I use join models and ignore
> has_and_belongs_to_many all together.
> 

The issue here is not the presence or absence of a join model -- after 
all, for a simple habtm, there's no reason at all to introduce the extra 
class.  Rather, this is a reflection of the fact that the OP is trying 
to do something weird.  With or without a join model, there should be no 
reason to add b to a.bs 3 times.

To the OP: can you explain more about why you think you need this?  I'm 
guessing your DB setup may be a bit pathological.
> 
> 
> --
> Greg Donald
> http://destiney.com/

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to