class Order < ApplicationRecord
has_many :line_items, dependent: :destroy, inverse_of: :order
accepts_nested_attributes_for :line_items,
reject_if: :all_blank,
allow_destroy: true
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["wrapper", "template", "anchor"]
add(event) {