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

Version Path
amazon-chime-sdk-rails-2.0.1 spec/rails_app/app/models/room.rb
amazon-chime-sdk-rails-2.0.0 spec/rails_app/app/models/room.rb
amazon-chime-sdk-rails-1.1.1 spec/rails_app/app/models/room.rb
amazon-chime-sdk-rails-1.1.0 spec/rails_app/app/models/room.rb
amazon-chime-sdk-rails-1.0.0 spec/rails_app/app/models/room.rb