Hi, One of my fields in my tables is a TEXT fields that holds a YAML document. I want to create tests for this model, and can''t figure out how to create the fixtures, such that one of the fixture fields is itself a YAML document ... Anybody any ideas? Joerg -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Is this even possible?> One of my fields in my tables is a TEXT fields that holds a YAML > document. > I want to create tests for this model, and can''t figure out how to > create the fixtures, such that one of the fixture fields is itself a > YAML document ...-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Ok - I''ve solved it: You can use the | symbol in YAML to denote a literal block. So I can do something like this: id: 1 name: My name calc_sheet: | <--- note the | symbol min_value: 1 max_value: 10 matrix: 0: 1.1 5: 1.0 10: 0.9 Joerg Diekmann wrote:> Is this even possible? > >> One of my fields in my tables is a TEXT fields that holds a YAML >> document. >> I want to create tests for this model, and can''t figure out how to >> create the fixtures, such that one of the fixture fields is itself a >> YAML document ...-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---