Module: TagsHelper

Defined in:
app/helpers/tags_helper.rb

Instance Method Summary collapse

Instance Method Details

#tag_list(taggable) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'app/helpers/tags_helper.rb', line 2

def tag_list taggable
  ''.html_safe.tap do |safe_string|
    taggable.tags.
      map(&:name).
      map{ |t| 
        safe_string << '<span rel="tag">'.html_safe
        safe_string << t
        safe_string << '</span>'.html_safe
      }
  end
end