Question about yaml. Thank you!

Hi friends:

I tried to convert a model object to yaml(use to_yaml method), and after
that, I would like to convert the yaml(string type) back to the model
object. But when I use YAML::load to do that, it failed, the return
object’s class is Yaml class, not my prior model class… Please tell me
how can I do to convert yaml to an object as the prior model class, or
how can I access the content of the model object by this yaml?

Thank you !

Tony Shih

Try this:

http://www.humandoing.net/past/2007/2/15/deserialize_objects_from_yaml/

On Apr 16, 12:41 pm, Shih T. [email protected]

Clever N. wrote:

Try this:

http://www.humandoing.net/past/2007/2/15/deserialize_objects_from_yaml/

On Apr 16, 12:41 pm, Shih T. [email protected]

It looks great… Thank you very much!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs