Sha256: 03b082f288ce63e9ea21bca753860d08b0338f2d8cc79c5612a73d73c16467cd
Contents?: true
Size: 403 Bytes
Versions: 13
Compression:
Stored size: 403 Bytes
Contents
module Voluntary module CommentsHelper def nested_comments(comments) comments.map do |comment, sub_comments| next if comment.id.blank? content = render(partial: 'comments/resource', locals: { resource: comment }) content += content_tag(:div, nested_comments(sub_comments), class: 'nested_comments') content end.join.html_safe end end end
Version data entries
13 entries across 13 versions & 1 rubygems