0

Delete all attachment from a subset of record

Hello

My plan is to delete images from records older than 2 years. I am thinking of the following steps:

1) Identify records older than 2 years.

2 then I need to delete the images from the database.

3) Put this in a special script which is given a date as a parameter to work from. I can then run this periodically.

1 reply

null
    • Fred
    • 7 mths ago
    • Reported - view

    Take a look at this post about the code to delete paperclip attachments. I don't know if you can change things around and use a subtable to store attachments as it would be much easier to delete records.

Content aside

  • 7 mths agoLast active
  • 1Replies
  • 29Views
  • 2 Following