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 …
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 …
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 D. 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 …
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.