Prevent accidental group deletion if path rename fails
If an update to the group path fails validation, the unsaved attributes
would still be presented because the controller would fall through and
call render
on the unsaved group object. There was an attempt to reset
the path to the previous value, but this did not work because the Rails
form helper called Group#to_param
, which loads the full route.
While it may have been intentional to retain the failed values, it's better to be safe and reset all the values back to their original state.
Relates to #241110 (closed)
Edited by Stan Hu