Use id instead of to_param for update form id

The value returned by record.to_param can change during an update action. Unlike record.id it can't be generally  relied on in on_update.js.erb to find the form. 

For example if record.name is part of to_param and the user edits the name and saves, on_update.js will show an RJS error alert.

Here is one possible way to solve the problem.