all repos — h3rald @ 1b6355dfdb7f8775e65727dec4a8126e64bb57f2

The sources of https://h3rald.com

Overriding link_for_tag...
h3rald h3rald@h3rald.com
Thu, 29 Oct 2009 12:54:01 +0100
commit

1b6355dfdb7f8775e65727dec4a8126e64bb57f2

parent

0d9c6782d7f5f221d6eeac23c1173b4069522ea8

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M lib/helpers.rblib/helpers.rb

@@ -21,8 +21,12 @@ def tags_for(article)

article.attributes[:tags].map{|t| %{<a class="tag" href="/tags/#{t}/">#{t}</a>}}.join " &middot; " end + def link_for_tag(tag, base_url) + %[<a href="#{base_url}#{tag}/" rel="tag">#{tag}</a>] + end + def tag_link_with_count(tag, count) - %{#{link_for_tag(tag+'/', '/tags/')} (#{count})} + %{#{link_for_tag(tag, '/tags/')} (#{count})} end def sorted_site_tags