Sha256: 14e8cc2a0a57706d0034aa80407fa4d33187429c74e1f949e626e06837949340
Contents?: true
Size: 331 Bytes
Versions: 3
Compression:
Stored size: 331 Bytes
Contents
# frozen_string_literal: true require 'whatup/server/models/application_record' module Whatup module Server class Room < ApplicationRecord has_many :clients, foreign_key: 'room_id' validates :name, uniqueness: true def drop_client! client client.update! room_id: nil end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
whatup-0.3.5 | lib/whatup/server/models/room.rb |
whatup-0.3.4 | lib/whatup/server/models/room.rb |
whatup-0.3.3 | lib/whatup/server/models/room.rb |