Skip to content

An ActiveRecord style validation method for preventing "offensive" content (mostly profanity) in model content

Notifications You must be signed in to change notification settings

insiderops/validates-non-offensiveness-of

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ValidatesNonOffensivenessOf
===========================

An ActiveRecord style validation method intended to prevent profanity and other
"offensive" content.

A list of offensive or disallowed words can be edited in lib/offensive_words.yml

Usage:

class Review < ActiveRecord::Base
  validates_non_offensiveness_of :body
end

@review = Review.new(:body => "Turd burglar")
@review.valid? #=> false
@review.errors #=> {:body => "can not contain the word 'Turd'"}

==========================
Written by: Bernd Ustorf

Contributons By:
Brandon Keene <bkeene@gmail.com>

About

An ActiveRecord style validation method for preventing "offensive" content (mostly profanity) in model content

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages