Commit 060a2e225755aedc99a8cdbc5fae8296daa7a958

Authored by Aleksei Kvitinskii
1 parent ac9afe0d

move tag path to the appropriate helper

app/helpers/tags_helper.rb 0 → 100644
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
  1 +module TagsHelper
  2 + def tag_path tag
  3 + "/tags/#{tag}"
  4 + end
  5 +end
app/views/projects/_list.html.haml
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 = project.name 14 = project.name
15 .small-tags 15 .small-tags
16 - project.tag_list.each do |tag| 16 - project.tag_list.each do |tag|
17 - = link_to tag, "/tags/#{tag}" 17 + = link_to tag, tag_path(tag)
18 18
19 %td= truncate project.url_to_repo 19 %td= truncate project.url_to_repo
20 %td= project.code 20 %td= project.code
app/views/tags/index.html.haml
@@ -7,5 +7,5 @@ @@ -7,5 +7,5 @@
7 7
8 .tags-list 8 .tags-list
9 - @tags.all.each do |tag| 9 - @tags.all.each do |tag|
10 - = link_to "#{tag.name}(#{tag.count})", "/tags/#{tag.name}" 10 + = link_to "#{tag.name}(#{tag.count})", tag_path(name)
11 11