Sha256: f4d2c00ef9a4e812426621cd6c6904e2986d750781cc6d84cab35e3535617be5
Contents?: true
Size: 281 Bytes
Versions: 63
Compression:
Stored size: 281 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).order('created_at DESC') } attr_accessor :recipient end end
Version data entries
63 entries across 63 versions & 1 rubygems