RubyGems.org

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.

installgem install auto_strip_attributes -v 1.0.1
Authors

Olli Huotari

41,898 total downloads 1,312 for this version
Owners

8e2b19390e10338e725eded7c798c8a7

Gemfile
gem 'auto_strip_attributes', '~> 1.0.1'
Versions
  1. 2.0.4 October 4, 2013 (9 KB)
  2. 2.0.3 October 2, 2013 (9 KB)
  3. 2.0.2 November 24, 2011 (9 KB)
  4. 2.0.1 November 24, 2011 (8.5 KB)
  5. 2.0 November 23, 2011 (8.5 KB)
Show all versions (8 total)
Runtime Dependencies
  1. activerecord >= 3.0