i'm a newbie . . . after a few installation problems finally i got
ruby and the rails running.
however, i did the scaffolding on a sample database (i created 2
records) and on the main page i see 2 edit and 2 delete links. which
means to me that the model is connected to the database .. . .
i clicked on the "new" link and created another record with a title
and a little text. it created a new record but didn't save the data to
the DB just got a new id.
Well your problem sounds weird. Usually a id is assigned only when the
record is saved to the database. However please report the rails
version you are using. Rails 2.0 is not supporting scaffold anymore.
Also a newbie so please tell me if I have a bad assumption.
You used a generator for scaffolding right? Rails 2 has a bit
different syntax and if a part of it is that you explicitly have to
say what columns you want used in the scaffold
(name_of_column:sql_type) . Example, you have a table named pets with
columns name, age, place_of_birth ... You generate a scaffold with
script/generate scaffold Pet name:text age:integer ...
Hope this helped
i downloaded the gems and ... :
"gem1.8 install rubygems"
and the rails:
"gem1.8 install rails"
something was going on and I had to install openssl ... everything
seemed fine so I looked up some tutorials and tried one of the
examples .... that's all
i am an old time PHP guy so i knew something is very weird when I
could insert a new record but only the ID got saved ...