11 Jul '12, 2pm
Scaffolding for pre-existing database table in 2.0.1 - Ruby Forum:
Hi, first of all I will apologize in advance for my presumably noobish question, but I'm only starting to learn Rails and am a little confused with all the changes in 2.0.1. There are as good as no tutorials out yet and the 2 or 3 screencasts I've seen deal with the creation of both the app and the database. Now my problem is that I already have a database with a fair amount of records in it (contacts with columns id:integer, first_name:string, last_name:string). In order to get a simple CRUD interface (that's all I want for now), with the pre-2.0 version of Rails, I could simply "generate scaffold contacts" and the framework would provide me with all the necessary files to get started with (controller, model and views). When I try the same command ("generate scaffold contacts") in 2.0.1 it will almost do the same thing, but somehow it misses all the fields from the databa...