Sha256: e74c31c1250bed189c822f38ebfc263be0f5cf9c80dbef33ef416186b7c7b13b
Contents?: true
Size: 607 Bytes
Versions: 8
Compression:
Stored size: 607 Bytes
Contents
module BrickLayer::ViewHelper def list_of_sizes_for(data_set, image_attribute) if data_set.class.custom_field_options && data_set.class.custom_field_options[image_attribute.to_sym] sizes = data_set.class.custom_field_options[image_attribute.to_sym][:sizes] if !sizes.blank? html = "" sizes.each do |k,v| html += content_tag(:li, link_to("#{k.to_s.titlecase} #{image_attribute.titlecase}", data_set.send(image_attribute).thumb(v).url, { :target => "_blank"})) end content_tag(:ul, raw(html), { :class => "image-links"} ) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems