Sha256: 0033421ea534f30248edeee195178837c75bb684dd89943c64f9676dcb07377f
Contents?: true
Size: 529 Bytes
Versions: 1
Compression:
Stored size: 529 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 def truncate_comment_text? controller_name == "people" && action_name == "activity" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dorsale-3.5.1 | app/helpers/dorsale/comments_helper.rb |