Sha256: 6c3e3946f60269c79ce8f47f6369e1d8cc664806b6f3f7746faba5f838966cf4
Contents?: true
Size: 957 Bytes
Versions: 138
Compression:
Stored size: 957 Bytes
Contents
module Comee module Core class ItemStatus < ApplicationRecord INITIALIZED = "Initialized".freeze DELIVERY_NOTE_CREATED = "Delivery Note Created".freeze COMPLETELY_PICKED_AND_PACKED = "Completely Picked & Packed".freeze PARTIALLY_PICKED_AND_PACKED = "Partially Picked & Packed".freeze SHIPMENT_INSTRUCTION_CREATED = "Shipment Instruction Created".freeze STATUSES = [INITIALIZED, DELIVERY_NOTE_CREATED, COMPLETELY_PICKED_AND_PACKED, PARTIALLY_PICKED_AND_PACKED, SHIPMENT_INSTRUCTION_CREATED].freeze belongs_to :shipment_item validates :hash_code, :status, :status_date, presence: true validates :status, inclusion: {in: STATUSES} def self.ransackable_attributes(_auth_object = nil) %w[id hash_code status status_date sales_order_item_id] end def self.ransackable_associations(_auth_object = nil) ["shipment_item"] end end end end
Version data entries
138 entries across 138 versions & 1 rubygems