YAML and has many associations


#1

Hi,

I have the following:

order = YAML::load(order_yaml)

The YAML contains order_items too, and my order model has a has_many to
order_items.

When I do order.order_items, I don’t want Rails to go the db to get the
order_items, but use the order_items already contained in the object
created from the YAML.

How would I do this?

Thanks
Joerg