Marnen Laibow-Koser wrote: [...] >> * Could ActiveRecord handle more of the model creation in this case? >> If so, how? > > ActiveRecord handles none of the model creation, as far as I can tell. > If you're asking about whether you could have script/generate model do > more, the answer is no, and you probably wouldn't want to in any case. > Excessive generated code is generally a maintenance problem. > >> * How do I write the migration(s) to bring the db in sync with the >> revised models? > > script/generate model already does that for you. Look in db/migrate.
A bit more about these two points. If you type "script/generate model" at the command line, you will see help text talking about options. You *can* specify field names and types which will be written into the generated migration file. If you don't do this, then the migration will still be generated, but it will not contain any field names. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.