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 (
Run the following if you haven't already:
gem sources -a http://gems.github.com
Install the gem(s):
sudo gem install linkingpaths-acts_as_abusable
Aitor García (author)
Thu Oct 16 08:46:04 -0700 2008
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README.markdown | Thu Oct 16 08:46:04 -0700 2008 | |
| |
Rakefile | Wed Apr 30 11:20:21 -0700 2008 | |
| |
acts_as_abusable.gemspec | Thu Oct 16 08:46:04 -0700 2008 | |
| |
generators/ | Wed Apr 30 11:20:21 -0700 2008 | |
| |
init.rb | ||
| |
lib/ | ||
| |
tasks/ | ||
| |
test/ |
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













