Strip Attributes Versions Save

:hocho: An ActiveModel extension that automatically strips all attributes of leading and trailing whitespace before validation. If the attribute is blank, it strips the value to nil.

v1.13.0

2 years ago
  • Added a matcher for replace_newlines (#62)
  • Added Ruby 3.1 support

v1.12.0

2 years ago
  • Switches to GitHub CI Workflows
  • Adds support for Rails 7.0 (#58 and #59).

v1.11.0

4 years ago
  • Prevent stripping frozen values (#53)

v1.10.1

4 years ago
  • Fix strip behavior for frozen values (#53)

NOTE: This fix is backwards incompatible, but a future version will avoid stripping frozen values altogether.

v1.10.0

4 years ago
  • Clean up and remove (now) redundant #respond_to? calls (#49)
  • Legacy and deprecation cleanup (#50)
  • Update matcher to take list of arguments; alias it as #strip_attributes (#52)

v1.9.2

4 years ago
  • Fix regression in 1.9.1: Arrays & Hashes now become nil #48

v1.9.1

4 years ago
  • Add official Ruby 2.7 support #45
  • Zero-width space doesn't result in nil after stripping #46
  • Fix zero width space strip to nil #47

1.9.0

5 years ago
  • Adds :if and :unless options (#37)

v1.8.1

5 years ago
  • Add Rails 6 compatibility (#36)

v1.8.0

7 years ago
  • Added multibyte whitespace support to :collapse_spaces option (#32)