After following the instructions in this article, I got several errors related to the categories-recipes linking. I then downloaded the source code, and am encountering the same errors.
1. Both the list and edit views fail on account of NULL values. Error: undefined method `name' for nil:NilClass
I.e. if a recipe has no category assigned yet (based on the way the article progresses, they are all like this initially) the list page won't display. If I cut out that line of code, line 18, then I can get to the edit page, but then that will fail.
2. The update action fails with the error: Couldn't find Recipe without an ID
I saw the solutions posted previously, but none of them worked, and this is the most recent version of the source code posted in Part 2 of this article.
Can anyone suggest help on this?