Dont destroy attachments

78 views
Skip to first unread message

sigma

unread,
Sep 14, 2008, 7:05:31 AM9/14/08
to Paperclip Plugin
Hi all

Is it posible that the attachment is not destroy if i call the destroy-
method of a model?

Thank you for your help!

sigma

Jonathan Yurek

unread,
Sep 16, 2008, 10:10:09 AM9/16/08
to papercli...@googlegroups.com
Hi,

Are you asking because you want it destroyed and it's not, or it is
being destroyed and you don't want it to?

--
Jonathan Yurek, Founder and CTO
thoughtbot, inc.
organic brains. digital solutions.

617.482.1300 x114
http://www.thoughtbot.com/

sigma

unread,
Sep 19, 2008, 8:10:14 AM9/19/08
to Paperclip Plugin
Hi

It's beeing destroyed but I don't want to...

Oleg

unread,
Sep 22, 2008, 10:19:36 AM9/22/08
to Paperclip Plugin
Just put this method in the model where you don't want to have files
removed:

def destroy_attached_files
true
end

It overrides paperclip's :after_destroy callback.
Reply all
Reply to author
Forward
0 new messages