jrgifford / delayed_paperclip

Process your Paperclip attachments in the background with delayed_job or Resque.
http://www.jstorimer.com/ruby/2010/01/30/delayed-paperclip.html
MIT License
404 stars 155 forks source link

ignore default scopes when marking attachments as in processing #207

Closed omnikron closed 7 years ago

omnikron commented 7 years ago

If adding an attachment to a model with a default scope on it, the 'in processing' flag does not get updated from true to false once delayed paperclip has finished its work, so the record is left marked as 'in processing' even after its attachment has been processed.

This pull request simply adds unscoped to ensure that default scopes are removed before running the 'in processing' updates, both when setting it to true and to false.

morgoth commented 7 years ago

thanks