fixes #16792 - don't modify AR record attributes in-place
Rails 5 may call #freeze on strings passed in as an attribute during validation, so attributes must not be edited in-place with gsub! and similar methods.
Related issues
Refactor #16792: Don't modify AR record attributes in-place during normalisation
fixes #16792 - don't modify AR record attributes in-place
Rails 5 may call #freeze on strings passed in as an attribute during
validation, so attributes must not be edited in-place with gsub! and
similar methods.