[Rails] Four Days on Rails
James Knight
james.knight at goodtechnology.com
Tue Mar 1 00:06:44 GMT 2005
Hi John,
Thanks for writing this tutorial - it looks exactly what I need.
However, I'm having problems setting it up, and wonder whether I'm
missing something obvious.
Page 9 - adding the model and scaffold lines to the
categories_controller. Hold on, shouldn't that be category_controller?
At least, that's what's created when I run "ruby script/generate
controller category"
Anyway, when I add the scaffold and test it in a browser, I get this error:
ActiveRecord::StatementInvalid in Category#index
Invalid argument: SELECT * FROM categories
When I run that select in mysql it runs fine, although there's not yet
any content in there, so it returns an empty set.
Surely this shouldn't be an invalid statement.
Any ideas?
Thanks in advance.
James
More information about the Rails
mailing list