make changed_attributes work with new enum feature

Changed per the discussion in PR https://github.com/rails/rails/pull/13267.