user_group.rb 345 B

12345678910111213
  1. # Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
  2. class UserGroup < ApplicationModel
  3. self.table_name = 'groups_users'
  4. self.primary_keys = :user_id, :group_id, :access
  5. belongs_to :user
  6. belongs_to :group
  7. validates :access, presence: true
  8. def self.ref_key
  9. :user_id
  10. end
  11. end