intridea/profanity_filter — pull request #9 by Velkitor (2012-03-08 01:31:43+00:00)
Title: Added the ability to add and remove from the gem's distributed dictionary.

The following functions have been added to the ProfanityFilter::Base:

append_dictionary( ) - This will load the supplied yml file and merge it with the existing dictionary.
remove_from_dictionary( ) - This will load the supplied yml file and remove the keys in the supplied yml file from the current dictionary.

Example initializer for a Rails project:

profanity.rb:
ProfanityFilter::Base.append_dictionary(File.join(Rails.root,"/config/profanity.yml"))
ProfanityFilter::Base.remove_from_dictionary(File.join(Rails.root,"/config/profanity_exclude.yml"))