Sha256: 57fe3279376d6b92e241c21a5c577feaf7363afb3a7fcb3306861c0aebc59da5
Contents?: true
Size: 571 Bytes
Versions: 4
Compression:
Stored size: 571 Bytes
Contents
module Blogit module CommentsHelper # The commenter's name for a Comment. When the Comment has a website, includes an html # link containing their name. Otherwise, just shows the name as a String. # # comment - A {Blogit::Comment} # # Returns a String containing the commenter's name. def name_for_comment(comment) if comment.website? link_to(comment.name, comment.website, class: "blogit_comment__name_link") else comment.name end + " " + t('wrote', scope: "blogit.comments") end end end
Version data entries
4 entries across 4 versions & 1 rubygems