Method: ApplicationHelper#tag_links
- Defined in:
- app/helpers/application_helper.rb
#tag_links(post, limit = nil) ⇒ Object
60 61 62 63 |
# File 'app/helpers/application_helper.rb', line 60 def tag_links(post, limit = nil) = post..sort_by {|tag| tag.numitems}.reverse.map { |tag| link_to(tag.tag, :controller => 'tags', :action => 'show', :tag => CGI.escape(tag.tag)) } (limit ? .first(limit) : ).join(', ') end |