Sha256: 036c24ff4ef5955cb6d1895e8ce6f85a43f8999dc10244ecc487005469f86bd5
Contents?: true
Size: 770 Bytes
Versions: 5
Compression:
Stored size: 770 Bytes
Contents
module InvoiceBar module Billable # Specific features to invoicing. It specifies +due_date+ and # whether the invoice is received or issued. module Invoicing extend ActiveSupport::Concern included do attr_accessible :due_date, :payment_identification_number, :issuer validates :payment_identification_number, numericality: true, allow_blank: true class << self def received where(issuer: false) end def issued where(issuer: true) end end def received? if self.issuer? false else true end end def issued? !received? end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems