All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.0.0 - 2021-08-18
- Rails lifecycle hooks:
before_sanitizationandafter_sanitization. - Support for custom model sanitizers using
sanitizes_with. - Support for custom field sanitizers through classes that implement a
sanitizes_eachmethod.
- Sanitization is now specified on a per-field basis and follow the same patterns as ActiveRecord::Validations.
- Renamed
collapsetosquishto better match convention.
- Initializer/Configuration. Sanitization is not configured at a global level.
- Support for
onlyandexceptkeywords. - Removed
sanitizationmethod to better follow convention.
1.1.1 - 2021-05-06
sanitizationmethod tosanitizesas the new preferred way.sanitizationstill works and is an alias ofsanitizes.
1.1.0 - 2021-05-06
- Support for configuration block.
- BREAKING CHANGE: By default, Sanitization now does nothing. A configuration block should be used to set your desired defaults. Add
Sanitization.simple_defaults!toconfig/initializers/sanitization.rbfor version 1.0.x defaults.
1.0.0 - 2021-05-03
- Initial Release