Files
danbooru/app/helpers/comments_helper.rb
2021-01-16 01:02:42 -06:00

11 lines
333 B
Ruby

module CommentsHelper
def render_comment(comment, **options)
render CommentComponent.new(comment: comment, **options)
end
def render_comment_list(comments, **options)
dtext_data = DText.preprocess(comments.map(&:body))
render CommentComponent.with_collection(comments, dtext_data: dtext_data, **options)
end
end