The documentation about dirty tracking in the mobility gem states that:
Mobility uses locale suffixes to indicate which locale has changed; dirty tracking is implemented this way to ensure that it is clear what has changed in which locale, avoiding any possible ambiguity.
So the result of #changed
would look like this
post.changed
#=> ["title_en", "title_zh_cn", "body_en"]
However, I would like to get a simplified array of the attributes that were changed, without suffixes, like so:
#=> ["title", "body"]
How should I go about doing that other than manipulating the result of #changed
?
Thanks, Simon.