Sha256: fc6c1a74899ac7f02a79cab87fc835fddaf5f709dfb29a13e27eeb12b0058eb1

Contents?: true

Size: 359 Bytes

Versions: 2

Compression:

Stored size: 359 Bytes

Contents

module BitcoinActiveRecord::Models::ReceivedPayment
  extend ActiveSupport::Concern

  included do
    belongs_to(:payment, inverse_of: :received_payment, dependent: :destroy)
    belongs_to(:btc_address, inverse_of: :received_payments) # payment to this address

    validates(:payment, presence: true)
    validates(:payment_id, uniqueness: true)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bitcoin_active_record-0.0.2 lib/bitcoin_active_record/models/received_payment.rb
bitcoin_active_record-0.0.1 lib/bitcoin_active_record/models/received_payment.rb