Rails Validating

When I validate a page with a record set in it it gives me error
saying that

You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each

How can I resolve this