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
402 stars 155 forks source link

Dynamic only_process support #82

Closed sbkok closed 10 years ago

sbkok commented 10 years ago

Enables lambda support for the only_process option to determine which styles need to be processed delayed dynamically. This is supported in the generic paperclip gem, adding it to the delayed_paperclip gem allows you to process certain styles on attachments that support multiple file types as well.

process_in_background :avatar, :only_process => lambda { |a| a.instance.small_supported? ? [:small, :large] : [:large] }
ScotterC commented 10 years ago

This is fantastic. Thanks!