Sha256: 3451ccfebd927527a4eea92018d2e8a9cccedd047e7ff801a5b4bb9c2d7956aa

Contents?: true

Size: 572 Bytes

Versions: 128

Compression:

Stored size: 572 Bytes

Contents

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

      enum :status, {pending: 0, processed: 1}
      validates :date_issued, :status, 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 status]
      end

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

Version data entries

128 entries across 128 versions & 1 rubygems

Version Path
comee_core-0.3.62 app/models/comee/core/payment_deposit.rb
comee_core-0.3.61 app/models/comee/core/payment_deposit.rb
comee_core-0.3.60 app/models/comee/core/payment_deposit.rb
comee_core-0.3.59 app/models/comee/core/payment_deposit.rb
comee_core-0.3.58 app/models/comee/core/payment_deposit.rb
comee_core-0.3.57 app/models/comee/core/payment_deposit.rb
comee_core-0.3.56 app/models/comee/core/payment_deposit.rb
comee_core-0.3.55 app/models/comee/core/payment_deposit.rb
comee_core-0.3.54 app/models/comee/core/payment_deposit.rb
comee_core-0.3.53 app/models/comee/core/payment_deposit.rb
comee_core-0.3.51 app/models/comee/core/payment_deposit.rb
comee_core-0.3.50 app/models/comee/core/payment_deposit.rb
comee_core-0.3.49 app/models/comee/core/payment_deposit.rb
comee_core-0.3.48 app/models/comee/core/payment_deposit.rb
comee_core-0.3.47 app/models/comee/core/payment_deposit.rb
comee_core-0.3.46 app/models/comee/core/payment_deposit.rb
comee_core-0.3.45 app/models/comee/core/payment_deposit.rb
comee_core-0.3.44 app/models/comee/core/payment_deposit.rb
comee_core-0.3.43 app/models/comee/core/payment_deposit.rb
comee_core-0.3.42 app/models/comee/core/payment_deposit.rb