Sha256: 1bfd31b8026f70d197181716668c5dd57e1a0782b8bdf89f3c94e7da52389a4a

Contents?: true

Size: 323 Bytes

Versions: 32

Compression:

Stored size: 323 Bytes

Contents

class TagListRenderer < ResourceRenderer::AttributeRenderer::Base
  def display(attribute_name, _label, _options = {}, &_block)
    tag_list = value_for_attribute(attribute_name)
    output = tag_list.collect do |tag|
      h.content_tag(:span, tag, class: 'label label-default')
    end.join('&nbsp;').html_safe
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
cmor_tags-0.0.24.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.22.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.21.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.20.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.19.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.18.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.17.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.16.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.15.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.14.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.13.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.12.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.11.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.10.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.9.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.8.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.7.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.6.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.5.pre app/attribute_renderers/tag_list_renderer.rb
cmor_tags-0.0.4.pre app/attribute_renderers/tag_list_renderer.rb