Sha256: 79e8777b73dd6a145c4b6ec7869faeae991b1a96403cacc72fe93c09e0b5cd78
Contents?: true
Size: 245 Bytes
Versions: 5
Compression:
Stored size: 245 Bytes
Contents
class Room < ApplicationRecord has_many :entries, dependent: :destroy has_many :members, through: :entries, source: :user def add_member(user) entries.create(user: user) end def member?(user) members.include?(user) end end
Version data entries
5 entries across 5 versions & 1 rubygems