only process thumbnails if process_attachment_with_processing is defined

git-svn-id: http://svn.techno-weenie.net/projects/plugins/attachment_fu@2603 567b1171-46fb-0310-a4c9-b4bef9110e78
This commit is contained in:
technoweenie 2006-12-27 04:09:51 +00:00
Родитель bd18f3711b
Коммит 91847b1042
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -343,7 +343,7 @@ module Technoweenie # :nodoc:
# Cleans up after processing. Thumbnails are created, the attachment is stored to the backend, and the temp_paths are cleared.
def after_process_attachment
if @saved_attachment
if thumbnailable? && !attachment_options[:thumbnails].blank? && parent_id.nil?
if respond_to?(:process_attachment_with_processing) && thumbnailable? && !attachment_options[:thumbnails].blank? && parent_id.nil?
temp_file = temp_path || create_temp_file
attachment_options[:thumbnails].each { |suffix, size| create_or_update_thumbnail(temp_file, suffix, *size) }
end