# Update HABTM

**URL:** <https://www.ruby-forum.com/t/update-habtm/147925>\
**Category:** Rails\
**Created:** [September 7, 2008, 4:38am UTC](https://www.ruby-forum.com/t/update-habtm/147925 "2008-09-07T04:38:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![splashlin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@splashlin](https://www.ruby-forum.com/u/splashlin)\
**Post date:** [September 7, 2008, 4:38am UTC](https://www.ruby-forum.com/t/update-habtm/147925/1 "2008-09-07T04:38:09Z")

</div>

Hey guys I am new to rails and was wondering how you update HABTM  
tables. I have a join table called platforms and another table called  
games. They are joined with the table games\_platforms.

I have a view that creates a multi-select pick list of all the various  
platforms. I figured out how to repopulate the picklist with the  
correct items stored in my join table but I don’t know how to update  
them. Currently, I have a params[:games] that has the input from the  
list and I know the game courtesy of the params[:id]. Any help would be  
greatly appreciated it. Thanks.
