Module: Comments::ViewHelpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/comments/view_helpers.rb
Instance Method Summary collapse
Instance Method Details
#comments_tag(commentable, opts = {}) ⇒ Object
8 9 10 11 12 |
# File 'lib/comments/view_helpers.rb', line 8 def comments_tag(commentable, opts = {}) comments = Comment.where(commentable: commentable).includes(:user).order("lft asc, id asc").page(params[:page]) render partial: '/comments/comments', locals: { commentable: commentable, comments: comments } end |