Sha256: 4ced01cbc1a1ee50787ee57bdee9b0e8155f6bc9d14ce43b5f599d95bd4ceaa7

Contents?: true

Size: 969 Bytes

Versions: 1

Compression:

Stored size: 969 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,
                           exclude_fields: %i[assigned_by_id assigned_by_gr_rel_id]

  global_registry_bindings binding: :relationship,
                           type: :assigned_by,
                           id_column: :assigned_by_gr_rel_id,
                           include_all_columns: false,
                           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.2 spec/internal/app/models/assignment.rb