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 ba6a0d2b0133674da939eaad467d538e06fef429
tree 61bff747d2997dd1ecd0dfbd10fd6ff73bef1453
parent b14f0b33a0b7e265a253fc78500d29a9ec4f0383
tree 61bff747d2997dd1ecd0dfbd10fd6ff73bef1453
parent b14f0b33a0b7e265a253fc78500d29a9ec4f0383
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README.markdown | ||
| |
Rakefile | ||
| |
acts_as_abusable.gemspec | ||
| |
generators/ | ||
| |
init.rb | ||
| |
lib/ | ||
| |
tasks/ | ||
| |
test/ |
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 abuse reports about this photo penthouse_sweetie_photo.reported_abuses # Positive abuses penthouse_sweetie_photo.reported_abuses.confirmed # Still not evaluated abuse reports penthouse_sweetie_photo.reported_abuses.pending # Check if this photo has been positively marked as an abuse. penthouse_sweetie_photo.is_an_abuse?
And a new ´Abuse´ model:
abuse.confirmed? abuse.confirm! # URL used as base for the abuse report abuse.referer # Resource that is linked to the abuse report abuse.resource
Copyright (c) 2008 Linking Paths, released under the MIT license









