Skip to content

Commit

Permalink
Merge pull request #28 from tsuwatch/v2.6.0
Browse files Browse the repository at this point in the history
V2.6.0
  • Loading branch information
tsuwatch committed Feb 17, 2018
2 parents e38d7b6 + 51387c2 commit 555af0e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [2.6.0](https://github.com/tsuwatch/nazrin/compare/v2.5.0...v2.6.0)

### Features:

* Implement batch operation [#27](https://github.com/tsuwatch/nazrin/pull/27) - [@AMHOL](https://github.com/AMHOL)

## [2.5.0](https://github.com/tsuwatch/nazrin/compare/v2.4.0...v2.5.0)

### Features:
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class Post < ActiveRecord::Base
end
```

### `.search`
```ruby
result = Post.search(where: :foo, includes: :bar).size(1).start(0).query("(and 'content')").query_parser('structured').execute
=> [#<Post id: 1, content: "content">]
Expand All @@ -76,6 +77,20 @@ result.facets
=> {}
```

### `.batch_operation`
```ruby
post1 = Post.create
post2 = Post.create
post3 = Post.create
post3.destroy

Post.batch_operation(
add: [post1, post2],
delete: [post3]
)
```


### Supported pagination libraries
If you want to use other supported pagination libraries, for example, `nazrin-kaminari` generates `Kaminari::PaginatableArray` instead of `Nazrin::PaginatedArray`.

Expand Down
2 changes: 1 addition & 1 deletion lib/nazrin/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Nazrin
VERSION = '2.5.0'
VERSION = '2.6.0'
end

0 comments on commit 555af0e

Please sign in to comment.