Project

General

Profile

« Previous | Next » 

Revision 4ef5bacc

Added by Marc Dequènes almost 14 years ago

  • ID 4ef5bacc0c50575e64b8f6302e1a385043656441

[fix] ensure the default display size for a thumbnail (currently the full image) does not crash (closes #77)

View differences:

app/models/artwork_step_image.rb
attr_accessor :saved_attachment
def thumbnail(size)
return self if size.nil?
thumb = self.artwork_step_thumbnails.find_by_thumbnail(size.to_s)
if thumb.nil?
regen_thumbnail(size)
......
def regen_thumbnail(size_name)
return unless self.exists?
return if size_name.nil?
size = attachment_options[:thumbnails][size_name]
temp_file = create_temp_file

Also available in: Unified diff