I'm struggling to figure out how to build has_many associations in rails using nested fields.
I've got has_many :addresses on an Order resource. If I create a new resource, I'd expect order.addresses to be something other than nil, and if I try setting it to [Address.new], it still returns nil.
I'm struggling to figure out how to build has_many associations in rails using nested fields.
I've got
has_many :addresses
on anOrder
resource. If I create a new resource, I'd expectorder.addresses
to be something other thannil
, and if I try setting it to[Address.new]
, it still returns nil.Am I missing something?