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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On Jan 11, 2:28 pm, Lucas Jenß <lucas.je...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.