mongoid info added to changelog and readme

This commit is contained in:
Zhomart Mukhamejanov 2014-11-03 16:45:12 -08:00
parent 417b703fd0
commit e0d4fb3e08
2 changed files with 18 additions and 1 deletions

View File

@ -5,6 +5,10 @@ henceforth should be documented here.
## Master (Unreleased)
### Added
* Add support for `mongoid 4.0` without associations ([pull request](https://github.com/activerecord-hackery/ransack/pull/407)).
*Zhomart Mukhamejanov*
### Fixed
* Add support and tests for passing stringy booleans for ransackable scopes

View File

@ -26,7 +26,7 @@ instead.
## Getting started
Ransack is currently compatible with Rails 3.x, 4.0, 4.1 and 4.2.
Ransack is currently compatible with Rails 3.x, 4.0, 4.1 and 4.2. Since 1.6.0 added support for Mongoid 4.0 without associations.
In your Gemfile, for the last officially released Ransack gem:
@ -595,6 +595,19 @@ en:
title: Old Ransack Namespaced Title
```
### Mongoid
Usage of ransack with Mongoid is same as with ActiveRecord. Currently ransack doesn't support Mongoid's associations. [Here](http://ransack-mongodb-demo.herokuapp.com/) is the demo application (demo source code is [here](https://github.com/Zhomart/ransack-mongodb-demo). `result` method of `Ransack::Search` returns `Mongoid::Criteria`:
```ruby
@q = Person.search(params[:q])
@people = @q.result # => Mongoid::Criteria
# or you can add more Mongoid queries
@people = @q.result.active.order_by(updated_at: -1).limit(10)
```
## Semantic Versioning
Ransack attempts to follow semantic versioning in the format of `x.y.z`, where: