0.01
No commit activity in last 3 years
No release in over 3 years
Tiny plugin to mark any rails model instance as an abuse or site's community guideline violation.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

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-2020 Linking Paths, released under the MIT license