How to handle no category on select element?

I have situation like this:

Assign: Choose category 1 category 2

So when I choose option ‘Choose’ with value 0 and I don’t have a
category with that id i get error…

Making a new category in table with title = ‘No category’ doesn’t feel

How can I handle that kind of problem?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs