Friday, January 11, 2013

[Rails] Re: YAML defaults in Fixtures

On Jan 11, 2:28 pm, Lucas Jenß <lucas.je...@gmail.com> wrote:

> DEFAULTS: &DEFAULTS
>   created_on: <%= 3.weeks.ago.to_s(:db) %>
> first:
>   name: Smurf
>   *DEFAULTS
> second:
>   name: Fraggle
>   *DEFAULTS
>
> When using that exact snippet, psych throws a parsing error. If one changes
> "*DEFAULTS" to "<<: *DEFAULTS", it works. Is the described syntax simply
> not supported yet? It seems to have been introduced in YAML 1.2<http://www.yaml.org/spec/1.2/spec.html#id2761803>
>  ...

What version of psych? I vaguely recall early versions of it rejecting
stuff like that (that syck had previous accepted)

Fred

>
> Best regards,
> Lucas

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate