class CommentUser < ActiveRecord::Base
  # Accessors
  attr_accessible :comment_id, :user_id, :kind

  # associations
  belongs_to :comment
  belongs_to :user

  # delegate
  delegate :name, :email, :role_name, to: :user, allow_nil: true, prefix: true

  # scopes
  scope :assigned, where(kind: 'assigned')
  scope :invited, where(kind: 'invited')
end
