You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normalizing an array might not be a common use case - perhaps changing a string via destructive method like gsub! or similar might also cause this.
From skimming the code this looks to be because normalization only happens via override of the assignment operator.
One idea to handle this might be to normalize via callback if included via ActiveModel/ActiveRecord I guess, but seems like that would be a pretty big change so maybe "won't fix" is appropriate here.
Perhaps a mention in the documentation that normalization only happens when using the assignment operator - or that destructive methods are not compatible would be helpful. From just reading the docs, this wasn't clear to me.
The text was updated successfully, but these errors were encountered:
For example, if you are normalizing an array attribute and you do any of the following:
Normalizing an array might not be a common use case - perhaps changing a string via destructive method like
gsub!
or similar might also cause this.From skimming the code this looks to be because normalization only happens via override of the assignment operator.
One idea to handle this might be to normalize via callback if included via ActiveModel/ActiveRecord I guess, but seems like that would be a pretty big change so maybe "won't fix" is appropriate here.
Perhaps a mention in the documentation that normalization only happens when using the assignment operator - or that destructive methods are not compatible would be helpful. From just reading the docs, this wasn't clear to me.
The text was updated successfully, but these errors were encountered: