Sha256: 8e256cbcb5ecd86f63dc869da964684dc0f837cd21bc3d7a2ff8bbada6e0bae2
Contents?: true
Size: 503 Bytes
Versions: 28
Compression:
Stored size: 503 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 def subscribed_users @users ||= User.in(id: subscribed_user_ids) end end end end
Version data entries
28 entries across 28 versions & 1 rubygems