Module: SubjModels::OrderDeliverySubjCourierModule

Defined in:
lib/subj_models/order_delivery_subj_courier.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(including_class) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/subj_models/order_delivery_subj_courier.rb', line 5

def self.included(including_class)

  including_class.class_eval do
    include SubjModels::ComprisingExternalId

    belongs_to :order
    belongs_to :city

    scope :order_id, -> (order_id) { parent_id_scope("order", order_id) }

  end

end

Instance Method Details

#to_sObject



19
20
21
# File 'lib/subj_models/order_delivery_subj_courier.rb', line 19

def to_s
  id.to_s # TODO
end