Skip to content

talentnest/sanitize_attr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SanitizeAttr

Gem Version Build Status

Automatically run AR attributes through Sanitize.clean before validation.

Installation

Add this line to your application's Gemfile:

gem 'sanitize_attr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sanitize_attr

Usage

class Article < ActiveRecord::Base
  sanitize_attr :name, :description, config: :default
end

If no config is specified, Sanitize::Config::BASIC is used.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Automatically run attributes through Sanitize before validation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%