Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

has_moderated

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has_moderated

  • 1.2.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= HasModerated {Build Status}[http://travis-ci.org/mrbrdo/has_moderated]

== Installing

Add it to your project's Gemfile

gem "has_moderated"

and run

bundle install

To set up has_moderated in your project, use

rails generate has_moderated:install

rake db:migrate

This will generate a Moderation model and a migration for it.

== Upgrading

When upgrading, rerun the generator

rails generate has_moderated:install

If you are upgrading from a version lower than 1.0.x you need to remove the old create_moderations migration file.

Make sure you have reviewed and accepted/declined all current moderations before upgrading! This means the moderations table in database should be empty, otherwise the migration process might fail (on purpose).

== Documentation

To learn how to use has_moderated, have a look at the wiki: https://github.com/mrbrdo/has_moderated/wiki

== Tests

I've tested this project using RSpec. You can find the tests in

test/dummy/spec/models/task_spec.rb test/dummy/spec/models/photo_spec.rb

You can run the tests by running

rake spec

in the root directory of this gem (so you have to clone it first).

== Problems

If you have problems open an issue here on Github.

You may encounter problems with models that have some sort of non-serializable attributes. This might be something like file attachments, you'll have to try it to see. If you have a problem like that you can extract the problematic attributes into a seperate has_one association. If you moderate create, save that model without the foreign key first, and then use has_moderated_create :with_associations => [:association_name] and add the association (to the existing associated model) before saving the moderated model. If you have questions about this or don't understand what I mean, open an issue here at GitHub and I will explain it further.

It is also possible you will encounter problems with some heavily customized associations, or with has_many :through associations (although I have tested this for a simple, ordinary case and it works). If that happens open an issue here on Github.

== License

This project rocks and uses MIT-LICENSE.

FAQs

Package last updated on 27 Nov 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc