ActsAsStrippableOn
Easy way to define AR attributes that should be stripped before save
Installation
Add this line to your application's Gemfile:
gem 'acts_as_strippable_on'
And then execute:
$ bundle
Or install it yourself as:
$ gem install acts_as_strippable_on
Usage
Setup
class User < ActiveRecord::Base
acts_as_strippable_on :email, :login
end
Attributes email
and login
will be stripped before model validation.
Contributing
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request