Sha256: 1d32a8ed570cf835a1d02b1ab9f49fc46543391618ee4ffc49f3da7571fe8967

Contents?: true

Size: 256 Bytes

Versions: 1

Compression:

Stored size: 256 Bytes

Contents

module MyForum
  class PrivateMessage < ActiveRecord::Base
    scope :unread_count_for, -> (user) { where(recipient_id: user.id, unread: true).count }
    scope :inbox_for, -> (user) { where(recipient_id: user.id) }

    attr_accessor :recipient
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
my_forum-0.0.1.beta1 app/models/my_forum/private_message.rb