Overriding link_for_tag...
h3rald h3rald@h3rald.com
Thu, 29 Oct 2009 12:54:01 +0100
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
lib/helpers.rb
→
lib/helpers.rb
@@ -21,8 +21,12 @@ def tags_for(article)
article.attributes[:tags].map{|t| %{<a class="tag" href="/tags/#{t}/">#{t}</a>}}.join " · " 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