0

I will be the first to admit that I am probably doing this wrong or have a poor workflow but I am trying to build my first rails app. It works different in 3 than I recall in rails 1 (last time i putzed around with this). I remember defining my models and building theDB off that. So instead I did this:

$script/generate scaffold post name:string address:text dob:date desire:text interests:text hobby:text signature:text

Then, it builds some files (views controllers models etc.) but it builds the migration file. I have a complex table (above is just an example) and im not going to type out all the fields. So i thought I could do something like the above and then goto the created migreation create file and add the rest of myfields (since that editor is nice than a command line way or from an IDE but using the actual source editor) and do a rake db:migrate and get the database with all the fields.and have it regenerate the scaffold etc... it does not seem to be doing this, is myworkflow poor?

Codejoy
  • 3,722
  • 13
  • 59
  • 99
  • this seems to be what I want: http://stackoverflow.com/questions/4438619/rails-3-adding-fields-to-a-table – Codejoy Apr 08 '13 at 05:07
  • oh editing them isn't a problem. I was just editing the wrong one it seemed. Or doing it wrong in general, but I seemed to figure it out. I wish I could regenerate my scaffolds too cause I added new fields now. I dont like scaffolding but for some quick and dirty proof of concept its nice. – Codejoy Apr 08 '13 at 05:36

0 Answers0