AutoStripAttributes helps to remove unnecessary whitespaces from ActiveRecord or ActiveModel attributes. It's good for removing accidental spaces from user inputs. It works by adding a before_validation hook to the record. It has option to set empty strings to nil or to remove extra spaces inside the string.
Required Ruby Version
>= 3.1
Authors
Olli Huotari
Versions
-
3.0.0
-
source
- 3.0.0 source September 08, 2026 (12.5 KB)
-
-
2.6.0
-
source
- 2.6.0 source March 25, 2020 (12 KB)
-
-
2.5.0
-
source
- 2.5.0 source September 06, 2018 (11.5 KB)
-
-
2.4.0
-
source
- 2.4.0 source March 25, 2018 (11.5 KB)
-
-
2.3.0
-
source
- 2.3.0 source February 06, 2018 (11 KB)
-