-
Notifications
You must be signed in to change notification settings - Fork 1
insiderops/validates-non-offensiveness-of
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
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 0
No packages published