Sha256: 6f4b6622e0f4e08a36d96bb9c15f72cf4fbcdfab907f79a51507929f700b8d14

Contents?: true

Size: 499 Bytes

Versions: 44

Compression:

Stored size: 499 Bytes

Contents

module Comee
  module Core
    class PurchaseOrder < ApplicationRecord
      belongs_to :supplier
      validates :order_date, :delivery_address, presence: true
      enum status: {
        draft: 0,
        pending_approval: 1,
        approved: 2,
        submitted_to_supplier: 3
      }
      def self.ransackable_attributes(_auth_object = nil)
        %w[
          id
          supplier_id
          order_date
          status
          delivery_address
        ]
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
comee_core-0.2.34 app/models/comee/core/purchase_order.rb
comee_core-0.2.33 app/models/comee/core/purchase_order.rb
comee_core-0.2.32 app/models/comee/core/purchase_order.rb
comee_core-0.2.31 app/models/comee/core/purchase_order.rb
comee_core-0.2.30 app/models/comee/core/purchase_order.rb
comee_core-0.2.29 app/models/comee/core/purchase_order.rb
comee_core-0.2.28 app/models/comee/core/purchase_order.rb
comee_core-0.2.27 app/models/comee/core/purchase_order.rb
comee_core-0.2.26 app/models/comee/core/purchase_order.rb
comee_core-0.2.25 app/models/comee/core/purchase_order.rb
comee_core-0.2.24 app/models/comee/core/purchase_order.rb
comee_core-0.2.23 app/models/comee/core/purchase_order.rb
comee_core-0.2.22 app/models/comee/core/purchase_order.rb
comee_core-0.2.21 app/models/comee/core/purchase_order.rb
comee_core-0.2.20 app/models/comee/core/purchase_order.rb
comee_core-0.2.19 app/models/comee/core/purchase_order.rb
comee_core-0.2.18 app/models/comee/core/purchase_order.rb
comee_core-0.2.17 app/models/comee/core/purchase_order.rb
comee_core-0.2.16 app/models/comee/core/purchase_order.rb
comee_core-0.2.15 app/models/comee/core/purchase_order.rb