blob: 519de095219bd1c5b0e7af978e588aec09cc40de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
# Order
# public_id: string
class Order < ApplicationRecord
belongs_to :user_account
has_one :payment, dependent: :destroy
has_many :product_orders, dependent: :destroy
has_many :products, through: :product_orders
accepts_nested_attributes_for :product_orders
def to_param
public_id
end
end
|