Do you want to flag content that you have stored in mongoid in your app?
Add this line to your application's Gemfile:
gem 'mongoid-flaggable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mongoid-flaggable
To have content that you can flag in your application just include Mongoid::flaggable in your Mongoid Documents like so:
class Article
include Mongoid::Document
include Mongoid::Flaggable
end
Once you have done so there will be a couple of methods that will be injected in your Article class:
- #flag_with_reason
- #flag_for_user_with_reason (note that this method will only be injected if there is a User object present in the vm at runtime)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request