Agile Web Development

Build it. Launch it. Love it.

Comic Curse

ComicCurse

====

A plugin that adds a ‘comic_curse’ method to String objects. The method replaces curse words in the String with a default or defined ‘safe’ string. The curse words are kept in a YAML file (RAILS_ROOT/config/curse_words.yml) and are hashed according to language. You can set one or many or all languages to be used in the RAILS_ROOT/config/environment.rb file.

Installation should set you up with the defaults.

Feel free to email me any additions you have to the curse_words.yml file. I didn’t spend too much time researching all the possibilities :o)

Example

=

"bad words like fuck are replaced".comic_curse => "bad words like %$#@! are replaced"

or

"bad words like fuck are replaced".comic_curse(’*****’) => "bad words like ***** are replaced"

Git repository at GitHub: http://github.com/erbmicha/comic-curse

Please add to the comic_curse.yml library!

Vitals

Home http://www.erbmicha.com
Repository http://svn.erbmicha.com/comic_curse/trunk
License Rails' (MIT)
Tags Tag_red
Rating (5 votes)
Owner Michael Erb
Created 16 March 2008

Comments

  • Avatar
    court3nay
    17 March 2008

    see also: http://plugins.svn.locusfoc.us/browser/r19/trunk/name_nanny

Add a comment