StripAttributes automatically strips all ActiveRecord model attributes of leading and trailing whitespace before validation. If the attribute is blank, it strips the value to nil.
Ryan McGeary
MIT
gem "strip_attributes", "~> 1.4.3"