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

Version Path
enju_biblio-0.3.18 app/helpers/picture_files_helper.rb
enju_biblio-0.3.17 app/helpers/picture_files_helper.rb
enju_biblio-0.3.16 app/helpers/picture_files_helper.rb
enju_biblio-0.3.15 app/helpers/picture_files_helper.rb
enju_biblio-0.3.14 app/helpers/picture_files_helper.rb
enju_biblio-0.3.13 app/helpers/picture_files_helper.rb
enju_biblio-0.3.12 app/helpers/picture_files_helper.rb
enju_biblio-0.3.11 app/helpers/picture_files_helper.rb
enju_biblio-0.3.10 app/helpers/picture_files_helper.rb
enju_biblio-0.3.10.rc.3 app/helpers/picture_files_helper.rb
enju_biblio-0.3.10.rc.2 app/helpers/picture_files_helper.rb
enju_biblio-0.3.10.rc.1 app/helpers/picture_files_helper.rb
enju_biblio-0.3.9 app/helpers/picture_files_helper.rb
enju_biblio-0.4.0.rc.1 app/helpers/picture_files_helper.rb
enju_biblio-0.3.8 app/helpers/picture_files_helper.rb
enju_biblio-0.3.7 app/helpers/picture_files_helper.rb
enju_biblio-0.3.6 app/helpers/picture_files_helper.rb
enju_biblio-0.4.0.beta.2 app/helpers/picture_files_helper.rb
enju_biblio-0.4.0.beta.1 app/helpers/picture_files_helper.rb
enju_biblio-0.3.5 app/helpers/picture_files_helper.rb