| Article: |
Rolling with Ruby on Rails Revisited | |
| Subject: | is the code complete ? | |
| Date: | 2006-12-20 12:10:44 | |
| From: | sbaptista | |
|
Response to: is the code complete ?
|
||
|
> When trying to enter a recipe it fails because foreign key is absent. It is not an option on the [web] page.
|
||
Showing messages 1 through 2 of 2.
-
is the code complete ?
2007-10-18 11:17:56 miwi1142 [View]
-
is the code complete ?
2007-10-21 12:27:08 Bill Walton | [View]
Hi,
You're definitely not the first to ask the question ;-) The answer can be found in the second paragraph of my response just above, dated 2006-12-20.
Best regards,
Bill



and click on create, and fill out the form,
the submit does not go through because category_id is not being preset. In fact category does not show up in the recipe screen, just like in your screenshot. How can I fix that?
Mysql::Error: #23000Column 'category_id' cannot be null: INSERT INTO recipes (`title`, `date`, `category_id`, `description`, `instructions`) VALUES('afdsfa', '2007-10-18', NULL, 'dfsafas', 'dfsafsafdsa')