[Rails] Unexpected behavior with YAML

2011-01-27 Thread bob
Hi, I'm trying to figure out why I can't dump and load a ActiveRecord object with YAML. Please see the gist below for how to replicate, and the exact error I'm getting. https://gist.github.com/84f44da695b218ae9474 Basically I create a new project, new database, and new model. Create an

Re: [Rails] Unexpected behavior with YAML

2011-01-27 Thread Philip Hallstrom
On Jan 27, 2011, at 1:16 PM, bob wrote: Hi, I'm trying to figure out why I can't dump and load a ActiveRecord object with YAML. Not sure about your error, but you could do... tom = Dummy.new(:name = 'Tom') yml = toml.attributes.to_yaml new_tom = Dummy.new(YAML.load(yml)) or something