Sha256: 40b5267ffa39ce17f4d6a46b78f977e7062d35bfe9eed0e6e674ccd7958ee7ec
Contents?: true
Size: 818 Bytes
Versions: 17
Compression:
Stored size: 818 Bytes
Contents
module PictureFilesHelper def show_image(picture_file, options = {size: :medium}) case options[:size] when :medium if picture_file.picture.width.to_i >= 600 return image_tag picture_file_path(picture_file, format: :download, size: :medium), alt: "*", width: picture_file.picture.width(:medium), height: picture_file.picture.height(:medium) end when :thumb if picture_file.picture.width.to_i >= 100 return image_tag picture_file_path(picture_file, format: :download, size: :thumb), alt: "*", width: picture_file.picture.width(:thumb), height: picture_file.picture.height(:thumb) end end image_tag picture_file_path(picture_file, format: :download, size: :original), alt: "*", width: picture_file.picture.width, height: picture_file.picture.height end end
Version data entries
17 entries across 17 versions & 1 rubygems