class Tumblargh::Renderer::Blocks::NoteCount
Rendered if this post has notes. Always wrap note counts in this block so they will be properly hidden on non-post pages.
Public Instance Methods
note_count()
click to toggle source
# File lib/tumblargh/renderer/blocks/notes.rb, line 57 def note_count context_post.note_count || 0 end
note_count_with_label()
click to toggle source
# File lib/tumblargh/renderer/blocks/notes.rb, line 61 def note_count_with_label count = note_count "#{ count } note#{ count == 1 ? '' : 's' }" end
should_render?()
click to toggle source
# File lib/tumblargh/renderer/blocks/notes.rb, line 53 def should_render? note_count > 0 end