lib/decidim/comments/comments_helper.rb in decidim-comments-0.25.1 vs lib/decidim/comments/comments_helper.rb in decidim-comments-0.25.2

- old
+ new

@@ -5,15 +5,15 @@ # A helper to expose the comments component for a commentable module CommentsHelper # Render commentable comments inside the `expanded` template content. # # resource - A commentable resource - def comments_for(resource) + def comments_for(resource, options = {}) return unless resource.commentable? content_for :expanded do - inline_comments_for(resource) + inline_comments_for(resource, options) end end # Creates a Comments component through the comments cell. # @@ -26,10 +26,11 @@ cell( "decidim/comments/comments", resource, machine_translations: machine_translations_toggled?, single_comment: params.fetch("commentId", nil), - order: options[:order] + order: options[:order], + polymorphic: options[:polymorphic] ).to_s end end end end