Just set the label's post_id to nil. ..tony..
On Thu, Mar 11, 2010 at 12:18 PM, bl <[email protected]> wrote: > I can't find this anywhere. > > Let's say you're making the classic "blog" style app and you have > Posts with labels. Well I know you can do: > > some_post.labels << some_label > some_post.save > > But it seems like you can't do: > > some_label = Label.get(id) > some_post.labels.remove(some_label) > some_post.save > > remove() throws a type error, delete_if doesn't enumerate, etc. > > I must be missing something here. This would seem to be an essential > feature of associations but there's no documentation for it and web > searches turn up almost nothing. > > -- > You received this message because you are subscribed to the Google Groups > "DataMapper" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<datamapper%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/datamapper?hl=en. > > -- You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en.
