I''ve just got the solution to a problem I''d been having.
It looks like it''s quite common, so here goes:
When creating a scaffold page (using <tt>script/generate scaffold
...</tt>)
if you look at the pages it makes (through the server,
http:\\127.0.0.1:3000...)
all pages work except LIST, which complains of
Uninitialized Constant [your model name]
This seems to be to do with Rails'' use of convention instead of
configuration:
- Database name should be lowercase. The first call to <tt>Rails
my_app</tt> should be identical (same lower case).
- Table names should be lower case and pluralised (ie topics, not topic
or Topics)
- Calls to <tt>script/generate scaffold</tt> should be lower case
and
SINGULAR (ie topic, not topics or Topic or Topics)
I think this should be made more clear to n00bs like myself. I''m
finding
the online documentation for Rails is terrible. (Ruby has some great
docs though).
I hope that helps anyone who was getting as frustrated as I was
-IEB
--
Posted via http://www.ruby-forum.com/.