Sha256: bf23cd00fd97af9555a8f3d94d0498fa1ea8d4573b1c5545a1b6b74fd74d737d
Contents?: true
Size: 664 Bytes
Versions: 38
Compression:
Stored size: 664 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: 600 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: 100 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
38 entries across 37 versions & 2 rubygems