Sha256: c9e412a586a0bfbba6fd91b7ad17b91bd802412d99b4ab8520b8ae36734fd754
Contents?: true
Size: 432 Bytes
Versions: 4
Compression:
Stored size: 432 Bytes
Contents
module Dorsale::CommentsHelper def comments_for(commentable, options = {}) comments = policy_scope(::Dorsale::Comment) .where(commentable: commentable) .preload(:commentable, :author) new_comment = comments.new(author: current_user) render( :partial => "dorsale/comments/comments", :locals => { :comments => comments, :new_comment => new_comment, }, ) end end
Version data entries
4 entries across 4 versions & 1 rubygems