Sha256: 484cc5781011d18347f0c9544d593bb204d9017df6db4c84fd99dc16a7fbaa89

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

module Comable
  class OrderDelivery < ActiveRecord::Base
    include Decoratable

    belongs_to :order, class_name: Comable::Order.name, foreign_key: Comable::Order.table_name.singularize.foreign_key
    has_many :order_details, dependent: :destroy, class_name: Comable::OrderDetail.name, foreign_key: table_name.singularize.foreign_key

    accepts_nested_attributes_for :order_details

    delegate :customer, to: :order
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
comable-0.0.2 app/models/comable/order_delivery.rb
comable-0.0.1 app/models/comable/order_delivery.rb