Sha256: a69d1d62bdc7d55a529c326bb33c9479db9c4d9087ac0ac9d7a71af76370afcb
Contents?: true
Size: 466 Bytes
Versions: 1
Compression:
Stored size: 466 Bytes
Contents
module FamilyGallery::PicturesHelper def picture_image_tag(picture, args = {}) image_args = {alt: picture.title, class: "picture-image"}.merge(args) if args[:group] link_object = [args[:group], picture] else link_object = picture end width = image_args[:width].presence || 200 width *= 2 picture_url = rails_imager_p(picture.image, maxwidth: width) link_to(image_tag(picture_url, image_args), link_object) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
family_gallery-0.0.8 | app/helpers/family_gallery/pictures_helper.rb |