Bala,
YAML is multipurpose and can contain many different objects within one file
- while it might seem nicer to have a more "intelligent" parser - for
the
most part it''s not like it''s a huge burden and the advantage
with respect to
flexibility makes it much more desirable to have it the way it is.
John W Higgins
wishdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
On 9/27/06, Bala Paranj <bparanj-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
wrote:>
>
> Is there any way to represent the YAML fixtures in a DRY way?
>
> For example:
>
> train_photo:
>
> id: 1
> filename: train.jpg
> created_at: 2006-04-01 03:20:49
> thumbnail: t_train.jpg
> description: This is a cool train!
>
> lighthouse_photo:
> id: 2
> filename: lighthouse.jpg
> created_at: 2006-04-02 14:58:49
> thumbnail: t_lighthouse.jpg
> description: My favorite lighthouse.
>
> Why do we keep repeating the attributes?
>
> >
>
--
John W Higgins
wishdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---