Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 install.rb
Octocat-spinner-32 uninstall.rb
README
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>
Something went wrong with that request. Please try again.