Forum: Ruby on Rails YAML and has many associations

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Joerg D. (Guest)
on 2006-02-20 18:58

I have the following:

order = YAML::load(order_yaml)

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

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?

This topic is locked and can not be replied to.