Sha256: d6c9e4bdf37c97171b5efc469cc9c2c55d6f332e827385daa282b0e038c22adc

Contents?: true

Size: 511 Bytes

Versions: 56

Compression:

Stored size: 511 Bytes

Contents

module Comee
  module Core
    class PickupSchedule < ApplicationRecord
      enum :status, {draft: 0, confirmed: 1}

      belongs_to :pod
      belongs_to :time_slot
      belongs_to :agent, optional: true

      validates :status, presence: true

      def self.ransackable_attributes(_auth_object = nil)
        %w[id driver_license_no plate_no pod_id status time_slot_id truck_no]
      end

      def self.ransackable_associations(_auth_object = nil)
        %w[pod time_slot]
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
comee_core-0.3.62 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.61 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.60 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.59 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.58 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.57 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.56 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.55 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.54 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.53 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.51 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.50 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.49 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.48 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.47 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.46 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.45 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.44 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.43 app/models/comee/core/pickup_schedule.rb
comee_core-0.3.42 app/models/comee/core/pickup_schedule.rb