Ruby on Rails Monday, April 30, 2012

On 30 April 2012 13:23, Amir Z. <lists@ruby-forum.com> wrote:
>> Have you got the spaces at the front of the nested lines?
>>
>> Copy and paste the file here.
>>
>> Colin
>
> Dear Colin below is yml file.
>
> # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
>
> valid_user:
> id: 1
> screen_name: foobar
> email: foobar@gmail.com
> password: foobar
> authorization_token: 1
>
> invalid_user:
> id: 2
> screen_name: time
> email: tim@tim.com
> password: time
> authorization_token: 2
>
> Please let me know where I am wrong.

I don't know how many times in this thread I have pointed out that you
need spaces in front of the nested lines. In fact in my very first
reply I posted:

yml is very strict about formatting. You need spaces at the front of
nested lines, so
valid_user:
id: 1
screen_name: foobar
email: foobar@gmail.com
password: foobar
remember_me:
authorization_token: 1

Note the spaces in front of id:, screen_name: and so on.

Also note the first line of the file you posted, it gives you a link
to find out more. Did you go and look at that?

Colin

--
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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment