Sha256: 384ae578358c4eaacfb72ba500aa7cb119160b45d8b4d94b52d62b085b720d2d

Contents?: true

Size: 578 Bytes

Versions: 9

Compression:

Stored size: 578 Bytes

Contents

module Logistics
  module Core
    class BreakBulkTruckAssignment < ApplicationRecord
      validates :truck_type, uniqueness: true, presence: true
      has_many :truck_type_bb_weight_ranges


      def self.fetch_all
        result = []
        break_bulk_truck_assignments = BreakBulkTruckAssignment.all
        BreakBulkTruckAssignment.all.each do |break_bulk_truck_assignment|
          result.push({id: break_bulk_truck_assignment.id,
                       truck_type: break_bulk_truck_assignment.truck_type})
        end
        return result
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logistics_core-21.11.2 app/models/logistics/core/break_bulk_truck_assignment.rb
logistics_core-21.11.1 app/models/logistics/core/break_bulk_truck_assignment.rb
logistics_core-21.08.1 app/models/logistics/core/break_bulk_truck_assignment.rb
logistics_core-21.03.1 app/models/logistics/core/break_bulk_truck_assignment.rb
logistics_core-20.10.3 app/models/logistics/core/break_bulk_truck_assignment.rb
logistics_core-20.10.2 app/models/logistics/core/break_bulk_truck_assignment.rb
logistics_core-20.10.1 app/models/logistics/core/break_bulk_truck_assignment.rb
logistics_core-20.9.1 app/models/logistics/core/break_bulk_truck_assignment.rb
logistics_core-20.8.1 app/models/logistics/core/break_bulk_truck_assignment.rb