i've heard that YAML is a lot faster than XML. would this be something
i can use or is there something else that anyone would recommend for
something like this?
my_thingy.form_data.one
my_thingy.form_data.two
On Aug 2, 1:36 pm, "Jason Roelofs" <jameskil...@gmail.com> wrote:
> Aye.
>
> class MyThingy < AR::Base
> serialize :form_data
> end
>
> The form_data field will now be automatically saved as YAML text on
> save/create, and pulled back out into valid Ruby objects.
>
> For example:
>
> MyThingy.create :form_data => {:one => 1, :two => 2}
>
> becomes
>
> one: 1
> two: 2
>
> Jason
>
No, it would be my_thingy.form_data[:one], but that's close enough.
--
Cheers,
- Jacob Atzen