[Rails] Re: generate serialized attribute in fixture

2008-09-09 Thread Frederick Cheung
On 9 Sep 2008, at 11:10, Erwin wrote: > > Is there anyway to generate a serialized attribute like this one > inside the fixture : > > knowledge: "--- \n- 1\n- 3\n- 5\n- 7\n" > > I tried > knowledge: <%= [1, 3, 5, 7].to_yaml %> The difference between these two is that the second is actually sti

[Rails] Re: generate serialized attribute in fixture

2008-09-09 Thread Mukund
Does YAML::dump([1,3,5,7]) work ? You will need to require 'yaml' for it. On Sep 9, 3:10 pm, Erwin <[EMAIL PROTECTED]> wrote: > Is there anyway to generate a serialized attribute like this one > inside the fixture : > > knowledge: "--- \n- 1\n- 3\n- 5\n- 7\n" > > I tried > knowledge: <%= [1, 3,