Sha256: 7e3af0bb51c36a405135ffc8d744dcc88482fe44e3c16748c1be52ff44f87225
Contents?: true
Size: 600 Bytes
Versions: 5
Compression:
Stored size: 600 Bytes
Contents
class Picture < Document has_attached_file :file, :url => '/:class/:id.:extension', :path => ':rails_root/documents/:class/:id_partition/:style.:extension', :styles => {:thumb => ["48x48#"], :thumb0 => ["130x80#"] } # Thumbnail file def thumb(size, helper) case size when 16 "#{ size.to_s }/photo.png" when 48 helper.picture_path self, :format => format, :style => 'thumb' end end end
Version data entries
5 entries across 5 versions & 1 rubygems