mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-13 23:48:55 +01:00
10 lines
254 B
Ruby
10 lines
254 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# A single line inside an Order. Can be an article of Order
|
||
|
class OrderItem < ApplicationRecord
|
||
|
belongs_to :order
|
||
|
belongs_to :orderable, polymorphic: true
|
||
|
|
||
|
validates :orderable, :order_id, :amount, presence: true
|
||
|
end
|