Sha256: b568ea5269c9a794097044207d8a6ba2c55df3ded8dd91e797a4657b0a1f3d4d

Contents?: true

Size: 524 Bytes

Versions: 2

Compression:

Stored size: 524 Bytes

Contents

module Comee
  module Core
    class PaymentDeposit < ApplicationRecord
      belongs_to :client
      belongs_to :currency
      has_many :payments

      validates :reference_no, :date_issued, presence: true
      validates :amount, presence: true, numericality: {greater_than: 0}

      def self.ransackable_attributes(_auth_object = nil)
        %w[id reference_no bank_reference date_issued]
      end

      def self.ransackable_associations(_auth_object = nil)
        %w[client currency]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
comee_core-0.2.25 app/models/comee/core/payment_deposit.rb
comee_core-0.2.24 app/models/comee/core/payment_deposit.rb