using the collection_select helper

i had the following error while trying to implement Collection _select
in making a drop down of items in two models

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.map

my code in the views is as follows:

<%= collection_select("category", "category_id",@categorys, "id",
"category_type") %>
I need guidance on how to properly do this, thanks for the support
yesterday.

i had the following error while trying to implement Collection _select
in making a drop down of items in two models

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.map

my code in the views is as follows:

<%= collection_select("category", "category_id",@categorys, "id",

The error probably means that @categorys is nil, did you mean
@categories possibly?

Colin