On Lunes, 18 de Mayo de 2009 01:34:47 G. Sobrinho escribió:
> Hello,
>
> I have two models named Product and ProductImage (which uses
> attachment_fu). The Product has many Product Images in my case.
>
> I create new Product and upload some images. When I edit that Product and
> delete one of many images, the ProductImage isn't deleted, only the
> association. The record go "orphaned", without Product associated.
>
> How I change that to delete the ProductImage record instead of association?

Do you have :dependent => :destroy in your association definition?

-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to