Sean Colquhoun
2007-Sep-05 04:48 UTC
Quick question: making tables without id fields; migrations
I just started a tagging system for my site and I was getting funky errors when adding tags. I looked at the the data in the tables and realized that rails was only allowing me to save each tag once! Which meant that if i saved a tag for post 1, then i couldn''t associate that tag with any other post. Some head-scratching and cursing later, I remembered that join tables in HABTM relationships can''t have id fields. Awesome! I can fix it. Tha only problem is I don''t know how I would do that (make a table with no id column) using migrations. Anybody know? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sean Colquhoun
2007-Sep-05 04:55 UTC
Re: Quick question: making tables without id fields; migrati
Never mind! Got it! :id => false XD -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---