| Path: | README |
| Last Update: | Sat Sep 15 22:03:42 -0400 2007 |
script/plugin install http://code.macournoyer.com/svn/plugins/defensio/
script/generate defensio_migration comment
You‘re ready to go!
In your "article" class, add:
acts_as_defensio_article
In your "comment" class, add:
acts_as_defensio_comment :fields => { :content => :comment }
The :fields option allows you to configure fields that are sent to Defensio to classify a comment.
Look at Defensio::Client for a list of all those fields.
In the controller, before creating a comment set the request environment variables:
@comment.env = request.env
Then when the comment is created the spam, spaminess and signature columns will magically be set for your own pleasure.
Check out other examples in code.macournoyer.com/svn/plugins/defensio/example