peimelo/controlled_health_api

View on GitHub
app/models/membership.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class Membership < ApplicationRecord
  belongs_to :account
  belongs_to :user

  validates :user_id, presence: true,
                      uniqueness: { scope: :account_id }
end