<commit_before># Mongoid::Ajax::Rateable

TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

    gem 'mongoid-ajax-rateable'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install mongoid-ajax-rateable

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request<commit_msg>editing readme<commit_after># Mongoid::Ajax::Rateable

A gem to painlessly rate things (vote up or down, like on imgur), with ajax on the front and mongoDB in the back.

On Github: https://github.com/piousbox/mongoid-ajax-rateable

## Installation

Add this line to your application's Gemfile:

    gem 'mongoid-ajax-rateable'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install mongoid-ajax-rateable

## Usage

Note: the gem relies on jQuery, <which rateable jQuery plugin?>, and Mongoid. All of them are installed as dependencies if you don't have them. 

The entity doing the rating is assumed to be +@current_user+ in the views. Further, +@current_user.id+ is assumed to exist.

You need to take the following steps:
 - Add a route
 - allow some models to be rateable by +include Mongoid::Rateable+
 - add a view partial that allows the user to rate and view ratings

Simple, huh?

## Development

I'm using this guide to create the gem itself: https://github.com/radar/guides/blob/master/gem-development.md

I'm looking at Mongoid for inspiration and implementation.

I'm looking at this jQuery plugin as the potential base for the frontend: http://plugins.jquery.com/upvote/

## Contributing

0. Buy it use it break it fix it
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
{'fraction_non_alphanumeric': 0.08500244259892525, 'fraction_numerical': 0.00537371763556424, 'mean_word_length': 3.9112709832134294, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7260959', 'n_tokens_mistral': 626, 'n_tokens_neox': 598, 'n_words': 279}