Sha256: 727b7812438f89b900291292882aaae381e4a228e91a4e6eb14175e1d4b1666b
Contents?: true
Size: 360 Bytes
Versions: 8
Compression:
Stored size: 360 Bytes
Contents
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
Version data entries
8 entries across 8 versions & 1 rubygems