Sha256: 071e2d22f76e91925790551d189c1188e6b3a2453e96a53e0518cb5bd6f3897f

Contents?: true

Size: 343 Bytes

Versions: 7

Compression:

Stored size: 343 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

    link_to(image_tag(picture.image.url, image_args), link_object)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
family_gallery-0.0.7 app/helpers/family_gallery/pictures_helper.rb
family_gallery-0.0.6 app/helpers/family_gallery/pictures_helper.rb
family_gallery-0.0.5 app/helpers/family_gallery/pictures_helper.rb
family_gallery-0.0.4 app/helpers/family_gallery/pictures_helper.rb
family_gallery-0.0.3 app/helpers/family_gallery/pictures_helper.rb
family_gallery-0.0.2 app/helpers/family_gallery/pictures_helper.rb
family_gallery-0.0.1 app/helpers/family_gallery/pictures_helper.rb