Skip to content

Commit

Permalink
Let cropping also happen at create action
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Bleh committed Nov 20, 2014
1 parent 162a62f commit c20ed05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/papercrop/model_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def crop_attached_file(attachment_name, opts = {})
definitions[attachment_name][:processors] = definitions[attachment_name][:processors].unshift(:cropper)

before_update :"reprocess_to_crop_#{attachment_name}_attachment"
before_create :"reprocess_to_crop_#{attachment_name}_attachment"
end
end

Expand Down

0 comments on commit c20ed05

Please sign in to comment.