Created scaffold, failing when creating new?

ActionView::TemplateError (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.include?) on line #5 of
app/views/admin/_form.rhtml:
2:
3:
4:

Name

5: <%= text_field ‘profile’, ‘name’ %>


6:
7:

Email

8: <%= text_field ‘profile’, ‘email’ %>

any reason why scaffolding new option is failing? i tried it on another
rails application and it works fine. the only difference is that my
table ‘profile’ belongs_to town table and county table. and town and
county table has_many profiles.

disregard email, for some reason, after commenting out some private
variables in the profile model, the error went away.