1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/models/order_item.rb
2022-08-19 20:03:09 +02:00

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