Sha256: 771ba321d32bad0cde4643009a068e036337bcb5fdb83bbde3e70e3a66fb1bc7
Contents?: true
Size: 413 Bytes
Versions: 34
Compression:
Stored size: 413 Bytes
Contents
module Workarea module Admin module CommentableViewModel def has_comments? comment_count > 0 end def new_comments_for?(user) comments.any? { |c| !user.id.in?(c.viewed_by_ids) } end def comment_count @comment_count ||= comments.count end def comments @comments ||= CommentViewModel.wrap(model.comments) end end end end
Version data entries
34 entries across 34 versions & 1 rubygems