From f6bece94d8c10fc86f9684f14d6e36b06269c0f0 Mon Sep 17 00:00:00 2001 From: Nico Bleh Date: Thu, 20 Nov 2014 14:01:13 +0100 Subject: [PATCH] Refactor before_update and before_create to before_save --- lib/papercrop/model_extension.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/papercrop/model_extension.rb b/lib/papercrop/model_extension.rb index 567a0be..bbb7eb3 100644 --- a/lib/papercrop/model_extension.rb +++ b/lib/papercrop/model_extension.rb @@ -50,8 +50,7 @@ def crop_attached_file(attachment_name, opts = {}) definitions[attachment_name][:processors] ||= [] 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" + before_save :"reprocess_to_crop_#{attachment_name}_attachment" end end