Sha256: f3b5b8189e3a50bd328ef025aaf06556a8d298f41687a9eb1888a514ba925a29

Contents?: true

Size: 381 Bytes

Versions: 3

Compression:

Stored size: 381 Bytes

Contents

module CryptocoinPayable
  module Model
    def self.included(base)
      base.send :extend, ClassMethods
    end

    module ClassMethods
      def has_coin_payments(_options = {}) # rubocop:disable Naming/PredicateName
        has_many :coin_payments, -> { order(:id) },
          class_name: 'CryptocoinPayable::CoinPayment',
          as: 'payable'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cryptocoin_payable-1.1.0 lib/cryptocoin_payable/has_coin_payments.rb
cryptocoin_payable-1.0.1 lib/cryptocoin_payable/has_coin_payments.rb
cryptocoin_payable-1.0.0 lib/cryptocoin_payable/has_coin_payments.rb