OfficeMomsandDads/scheduler

View on GitHub
app/models/office_user.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

class OfficeUser < ApplicationRecord
  belongs_to :office
  belongs_to :user
  scope :notifiable, lambda {
    joins(:user).where(send_notifications: true).merge(User.notifiable)
  }
end