This plugin adds active record validation that you can use to prevent user from input assaulting word into specific field in your database. For example if you want to give your users possibility to exchange messages but you don’t want them to swearing.
Installation
ruby script/plugin install git@github.com/kayinrage/discriminating_words.git
Examples
class Message < ActiveRecord::Base
validates_discriminating_words_of :subject, :body
endif you use :with option then you can specify your own set of discriminated words
class Message < ActiveRecord::Base validates_discriminating_words_of :subject, :body, :with => "cholercia, ojejku, ladacznica, skurczybyk" end
