Umm... no. Table 'users' already has an implicit 'id' field (you don't have to mention them in your migrations), just like your 'links' table does. If you are sticking to the rails standard, you needn't declare them, they are the rails default primary key for their respective tables.
In your 'links' table, a 'user_id' field tells rails that: a) this field, 'user_id', contains an id to a record in another table - i.e., this record "belongs to" that record in that table over there, and that b) the related table is 'users' (field name - '_id', pluralized). -- 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-talk@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 -~----------~----~----~----~------~----~------~--~---