On Mar 17, 11:04 am, Frederick Cheung <frederick.che...@gmail.com> wrote: > Could you just tell rails that categories_id is the primary key? If > it's unique then that should be good enough (you'll probably have to > be a little careful when creating rows in this table though, as you'll > need to set categories_id each time) >
You are quite right Fred. I think I must have confused myself. I initially tried to bulk assign using create, but this resulted in the categories id not getting set. I thought i had tried using new and setting the categories_id before saving, but I must have confused myself. I have just tried it again and it works. Many Thanks -- 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.