13 lines
259 B
Ruby
13 lines
259 B
Ruby
module CommentsHelper
|
|
def comment_class(comment, is_view_root = false)
|
|
if comment.root? || is_view_root
|
|
"root"
|
|
else
|
|
"child"
|
|
end
|
|
end
|
|
|
|
def comment_user_id_unless_deleted(comment)
|
|
comment.deleted ? 0 : comment.user_id
|
|
end
|
|
end
|