Proposal: ActiveModel::Normalization

ActiveRecord::Normalization is such a nice new feature of Rails 7.1. However, it is only available for ActiveRecord, even though ActiveModel-based classes could also benefit from its features.

ActiveModel-based classes are for example used as Form Objects. Here, the normalization of user input would be very benefitial.

This is why I am proposing to move over most of the features of ActiveRecord::Normalization to ActiveModel::Normalization.

3 Likes