This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit b14f0b33a0b7e265a253fc78500d29a9ec4f0383
tree 79651f09db537e1f22b6a79eab77c7bbd2ace237
parent 426008a97dea93ad7c3cf71ad883029eaba99789
tree 79651f09db537e1f22b6a79eab77c7bbd2ace237
parent 426008a97dea93ad7c3cf71ad883029eaba99789
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Wed Apr 30 11:20:21 -0700 2008 | |
| |
README.markdown | ||
| |
Rakefile | ||
| |
acts_as_abusable.gemspec | ||
| |
generators/ | ||
| |
init.rb | ||
| |
install.rb | ||
| |
lib/ | ||
| |
rails/ | ||
| |
tasks/ | Wed Apr 30 11:20:21 -0700 2008 | |
| |
test/ | ||
| |
uninstall.rb |
README.markdown
acts_as_abusable
Tiny plugin to mark any rails model instance as an abuse or site's community guideline violation.
Installation
- Traditionally
script/plugin install git://github.com/linkingpaths/acts_as_abusable.git
- Gemplugin:
If you prefer the new "gemplugin" management system just insert the dependency on environment.rb:
config.gem "linkingpaths-acts_as_abusable", :lib => "acts_as_abusable"... and install it:
rake gems:install
- Finally use the builtin generator for the needed migration:
script/generate acts_as_abusable_migration rake db:migrate
Example
class Photo < ActiveRecord::Base acts_as_abusable end
This gives you:
# All reported abuses penthouse_sweetie_photo.reported_abuses # Positive abuses penthouse_sweetie_photo.reported_abuses.confirmed # Still not evaluated abuses penthouse_sweetie_photo.reported_abuses.pending # Confirmed. This is inter....erhm... and abuse. penthouse_sweetie_photo.is_an_abuse?
And a new ´Abuse´ model:
abuse.confirmed? abuse.confirm! # URL used as base for abuse.referer # Resource that supposely is an abuse abuse.resource
Copyright (c) 2008 Linking Paths, released under the MIT license









