Sha256: 3e47d1bc301de4bdee69ce9fb1d2c6423427b7ba89fab8c31b8a48252456c419

Contents?: true

Size: 961 Bytes

Versions: 1

Compression:

Stored size: 961 Bytes

Contents

# frozen_string_literal: true

class Assignment < ApplicationRecord
  belongs_to :person, class_name: 'Namespaced::Person'
  belongs_to :organization
  belongs_to :assigned_by, class_name: 'Namespaced::Person', foreign_key: 'assigned_by_id'

  global_registry_bindings binding: :relationship,
                           type: :fancy_org_assignment,
                           primary_association: :person,
                           related_association: :organization,
                           include_all_columns: true,
                           exclude: %i[assigned_by_id assigned_by_gr_rel_id]

  global_registry_bindings binding: :relationship,
                           type: :assigned_by,
                           id_column: :assigned_by_gr_rel_id,
                           primary_binding: :fancy_org_assignment,
                           primary_relationship_name: :assigned_by,
                           related_association: :assigned_by
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
global-registry-bindings-0.1.3 spec/internal/app/models/assignment.rb