Sha256: 4e994d9d691947c2da2062c413a88cce831b29cade3cb1f80314967f7985cccc

Contents?: true

Size: 509 Bytes

Versions: 105

Compression:

Stored size: 509 Bytes

Contents

module Comee
  module Core
    class Pod < ApplicationRecord
      enum :status, {draft: 0, confirmed: 1, signed: 2}
      has_many :shipment_instruction_items
      has_many :pickup_schedules
      has_many :delivery_notes
      has_many :invoices

      validates :reference_no, :status, presence: true

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

      def self.ransackable_associations(_auth_object = nil)
        []
      end
    end
  end
end

Version data entries

105 entries across 105 versions & 1 rubygems

Version Path
comee_core-0.3.1 app/models/comee/core/pod.rb
comee_core-0.3.0 app/models/comee/core/pod.rb
comee_core-0.2.99 app/models/comee/core/pod.rb
comee_core-0.2.98 app/models/comee/core/pod.rb
comee_core-0.2.97 app/models/comee/core/pod.rb
comee_core-0.2.96 app/models/comee/core/pod.rb
comee_core-0.2.95 app/models/comee/core/pod.rb
comee_core-0.2.94 app/models/comee/core/pod.rb
comee_core-0.2.93 app/models/comee/core/pod.rb
comee_core-0.2.92 app/models/comee/core/pod.rb
comee_core-0.2.91 app/models/comee/core/pod.rb
comee_core-0.2.90 app/models/comee/core/pod.rb
comee_core-0.2.89 app/models/comee/core/pod.rb
comee_core-0.2.88 app/models/comee/core/pod.rb
comee_core-0.2.87 app/models/comee/core/pod.rb
comee_core-0.2.86 app/models/comee/core/pod.rb
comee_core-0.2.85 app/models/comee/core/pod.rb
comee_core-0.2.84 app/models/comee/core/pod.rb
comee_core-0.2.83 app/models/comee/core/pod.rb
comee_core-0.2.82 app/models/comee/core/pod.rb