Commit e8971c94 by Wojciech Wnętrzak Committed by Tute Costa
parent 4debddb8
...@@ -240,7 +240,8 @@ module Paperclip ...@@ -240,7 +240,8 @@ module Paperclip
# the instance's errors and returns false, cancelling the save. # the instance's errors and returns false, cancelling the save.
def save def save
flush_deletes unless @options[:keep_old_files] 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) @queued_for_write.except!(:original)
end end
flush_writes flush_writes
......
...@@ -500,6 +500,7 @@ describe Paperclip::Attachment do ...@@ -500,6 +500,7 @@ describe Paperclip::Attachment do
@attachment.expects(:post_process).with(:thumb) @attachment.expects(:post_process).with(:thumb)
@attachment.expects(:post_process).with(:large).never @attachment.expects(:post_process).with(:large).never
@attachment.assign(@file) @attachment.assign(@file)
@attachment.save
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment