diff --git a/lib/paperclip/attachment.rb b/lib/paperclip/attachment.rb index bb528e70a..e1a5987fb 100644 --- a/lib/paperclip/attachment.rb +++ b/lib/paperclip/attachment.rb @@ -240,7 +240,8 @@ def dirty? # the instance's errors and returns false, cancelling the save. def save flush_deletes unless @options[:keep_old_files] - if @options[:only_process].any? && !@options[:only_process].include?(:original) + process = only_process + if process.any? && !process.include?(:original) @queued_for_write.except!(:original) end flush_writes diff --git a/spec/paperclip/attachment_spec.rb b/spec/paperclip/attachment_spec.rb index 81f4d4bae..be7fdbae2 100644 --- a/spec/paperclip/attachment_spec.rb +++ b/spec/paperclip/attachment_spec.rb @@ -500,6 +500,7 @@ @attachment.expects(:post_process).with(:thumb) @attachment.expects(:post_process).with(:large).never @attachment.assign(@file) + @attachment.save end end