class AppAttachedTagsComponent
Public Class Methods
Source
# File app/components/app_attached_tags_component.rb, line 11 def initialize(items) @items = items end
Renders a set of attached tags.
items is expected to be a hash mapping a string (used for the attached tag) to a hash containing the following keys: text, colour and details_text.
Public Instance Methods
Source
# File app/components/app_attached_tags_component.rb, line 15 def call safe_join( items.map do |attached, hash| status_tag(attached, hash[:text], hash[:colour], hash[:details_text]) end ) end