changing foreign key values

Hi all,

I have a simple inventory application that consists of rooms with many items (computers, printers, etc). I'd like to create a form for moving an existing item to another room. This means changing the value of the room_id foreign key in the particular row of the item table.

If I wasn't using Rails, I'd probably do something like assemble a hash of key = room name pairs with some SQL, and make a form with a drop-down that allows you to choose another room name and executes another sql statment that updates the item record with the new foreign key. Does that same strategy still apply, or is there a more "Rail- esque" way of doing that?

Just wondering...

thanks!

...adam