I’m trying to build a form that shows an order (from the orders table)
all of its line items (from the order_items table). I’ve defined the
class OrderItem < ActiveRecord::Base
class Order < ActiveRecord::Base
The problem is that the order object doesn’t have any order items
with it when I get to the edit form. I thought this association was
“automatic” based on the models. (no?)
<% @order.order_items.each do |item| %>
But this does not show anythingl.
I added a “debug(Order)” line on the form and I don’t see any
in the object.