README.md in mongoid_countercache-0.0.3 vs README.md in mongoid_countercache-1.0.0.mongoidalpha1
- old
+ new
@@ -1,23 +1,29 @@
-# MongoidCounterCache [![Build Status](https://travis-ci.org/Intrepidd/mongoid_countercache.png?branch=master)](https://travis-ci.org/Intrepidd/mongoid_countercache)
+# MongoidCounterCache [![Build Status](https://travis-ci.org/Intrepidd/mongoid_countercache.png?branch=mongoid4)](https://travis-ci.org/Intrepidd/mongoid_countercache)
+## Version
+
+This is the mongoid 4 compatible version, if you want the mongoid 3 version, please have a look at the master branch.
+
+## Description
+
This gem is used to maintain a cached counter of an object's children, this avoids N + 1 queries issues when doing a ``count`` in a loop.
This is basically an implementation of ActiveRecord counter cache for Mongoid.
## Installation
Add this line to your application's Gemfile:
- gem 'mongoid_countercache'
+ gem 'mongoid_countercache', '1.0.0.mongoidalpha1'
And then execute:
$ bundle
Or install it yourself as:
- $ gem install mongoid_countercache
+ $ gem install mongoid_countercache -v '1.0.0.mongoidalpha1'
## Usage
Include ``Mongoid::CounterCache`` into your embedded or referenced model :