Skip to content

Yoomee/yoomee-moderation

Repository files navigation

Yoomee-moderation

A simple flagging system for moderating content on a site. The gem provides a helper method to generate a flag link that users (logged-in or not) can click to report inappropriate content. Once clicked, a fancybox will appear for them to enter a brief message.

yoomee_flag_link(@asset, :text => "Flag this photo as offensive", :class => "flag-photo")

An administrator is notified by email for each new flagging and all the flaggings can be viewed by admins in the moderation area (‘/moderation/home’ or moderation_path).

Installation

Add the gem to your Gemfile:

gem "yoomee-moderation"

Run the install rake task, which will add migrations to db/migrate, assets to /public and yoomee_moderation.yml to /config:

rake yoomee_moderation:install

Run migrations:

rake db:migrate

Edit config/yoomee_moderation.yml to set where moderation emails get sent to etc.

Tests

A dummy Rails 3 app exists in test/dummy is used to run tests. From the root directory of the gem:

rake test

Releasing a new version of the gem

Update the version number in the gemspec and commit the change

git commit -m 'Bump version to #{new_version}'
git push

Build the gem:

bundle exec rake build

Push to gem server

gem inabox

Add git tag

git tag v#{new_version}

Push tags

git push --tags