Forum: Ruby on Rails Re: YAML - How to load data directly

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
etienne.durand (Guest)
on 2005-11-26 18:10
(Received via mailing list)
OK, let me explain what i want to do:
I am grabbing some info on a web site, and using my AR model to create
objects, but I don't persist them, i prefer saving them to an YAML file
(obviously, i don't have to parse only html files all the time, with a
cache mechanism, i first look up if exists in the YAML files).

Here is the problem: I create some AR objects, and i to_yaml to a file.
Then, i just copy/paste to a fixture. The problem is that the format is
a bit different (one level deeper) and i got some error when executing
the yaml file.

Has anyone experiences on this field?

Thank you again :)
Jean-Etienne
This topic is locked and can not be replied to.