Hi everyone.

I've noticed that the documentation on YAML defaults in 
Fixtures<http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html#label-Support+for+YAML+defaults>
 seems 
to be wrong. The syntax shown is not currently supported at least, if I'm 
not completely mistaken:

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>
 ...

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/bcwCZPhrivcJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to