The answer to this question is probably really simple, but I'm fairly new to rails and can't find any detailed information about this subject--not even in the Agile Web Development with Rails Book (2nd Edition). The questions deal with many-to-many relationships in rails. I've got some database background so the concept of many-to-many isn't foreign to me. First off, should I create all three tables (vehicles, features, and features_vehicles) in a single migration? If so, should I create the migration as "ruby script/generate migration features_vehicles"? Assuming I'm correct so far, what do I need to do for the vehicle and feature models (since Rails didn't auto-create these because I used generate migration for 3 tables rather than generate model for each part of the many-to-many table)? Any and all help will be greatly appreciated. If anyone knows of a good up-to-date tutorial (for Rails 1.2+), please share. Thanks in advance for your help!
on 2007-02-25 19:46