> Except... it's really nice to be able to modify the generated form when > you're demoing the application. If you went this approach, why not just use > a dynamic 'scaffold :product' line ?
Because generating the scaffold involves so much more than just the form elements. There are 4-5 actions that all are exposed. We actually already do this for the list with stuff like: <% for column in model_name.content_columns %> So the generated scaffold has a ton more value than just that single generated form. I agree that it's kinda nice, though. I just don't think its worth the pain. Where the pain being that 1) you can't run scaffold before setting up database (and it dies mid-air if you do), 2) the flow is backwards for migrations, 3) the form doesn't update if you add additional columns, and 4) the code to make this work is convoluted. > Why not make the generator clever: if there's no existing table, and no > existing > migration named create_xxx, create the migration. Otherwise, don't create it. Oh, that's interesting. I'd buy a patch for that if it can be made cleanly and without other side-effects. -- David Heinemeier Hansson http://www.loudthinking.com -- Broadcasting Brain http://www.basecamphq.com -- Online project management http://www.backpackit.com -- Personal information manager http://www.rubyonrails.com -- Web-application framework _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core