mongoid info added to changelog and readme
This commit is contained in:
parent
417b703fd0
commit
e0d4fb3e08
|
@ -5,6 +5,10 @@ henceforth should be documented here.
|
||||||
## Master (Unreleased)
|
## Master (Unreleased)
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
* Add support for `mongoid 4.0` without associations ([pull request](https://github.com/activerecord-hackery/ransack/pull/407)).
|
||||||
|
|
||||||
|
*Zhomart Mukhamejanov*
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
* Add support and tests for passing stringy booleans for ransackable scopes
|
* Add support and tests for passing stringy booleans for ransackable scopes
|
||||||
|
|
15
README.md
15
README.md
|
@ -26,7 +26,7 @@ instead.
|
||||||
|
|
||||||
## Getting started
|
## 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:
|
In your Gemfile, for the last officially released Ransack gem:
|
||||||
|
|
||||||
|
@ -595,6 +595,19 @@ en:
|
||||||
title: Old Ransack Namespaced Title
|
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
|
## Semantic Versioning
|
||||||
|
|
||||||
Ransack attempts to follow semantic versioning in the format of `x.y.z`, where:
|
Ransack attempts to follow semantic versioning in the format of `x.y.z`, where:
|
||||||
|
|
Loading…
Reference in New Issue