Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Fixed only_process option with proc (#2289)
Browse files Browse the repository at this point in the history
Bug introduced in 1c7d7f6

Per 1c7d7f6#commitcomment-18765681 request
  • Loading branch information
morgoth authored and tute committed Aug 28, 2016
1 parent df4ad1f commit d5eca24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/paperclip/attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/paperclip/attachment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@
@attachment.expects(:post_process).with(:thumb)
@attachment.expects(:post_process).with(:large).never
@attachment.assign(@file)
@attachment.save
end
end

Expand Down

0 comments on commit d5eca24

Please sign in to comment.