2011-11-07 11:40:22 +00:00
|
|
|
module TagsHelper
|
2014-09-25 22:07:40 +00:00
|
|
|
def tag_path(tag)
|
2011-11-09 19:26:24 +00:00
|
|
|
"/tags/#{tag}"
|
|
|
|
end
|
2011-11-07 17:48:58 +00:00
|
|
|
|
2014-09-25 22:07:40 +00:00
|
|
|
def tag_list(project)
|
2011-11-09 19:26:24 +00:00
|
|
|
html = ''
|
|
|
|
project.tag_list.each do |tag|
|
2014-10-09 07:47:47 +00:00
|
|
|
html << link_to(tag, tag_path(tag))
|
2011-11-09 19:26:24 +00:00
|
|
|
end
|
2011-11-07 17:48:58 +00:00
|
|
|
|
2011-11-09 19:26:24 +00:00
|
|
|
html.html_safe
|
|
|
|
end
|
2011-11-07 11:40:22 +00:00
|
|
|
end
|