Sha256: 5c2f83b646d31d0949fceb1b23503750df69f03c71cd6067d1c6779ca49716ec

Contents?: true

Size: 475 Bytes

Versions: 1

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

module Generalis
  module Linkable
    extend ActiveSupport::Concern

    included do
      has_many :ledger_links, as: :linkable, class_name: 'Generalis::Link',
                              dependent: :restrict_with_error, inverse_of: :linkable

      has_many :linked_ledger_transactions, class_name: 'Generalis::Transaction',
                                            through: :ledger_links, source: :ledger_transaction
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
generalis-0.1.0 lib/generalis/linkable.rb