elastictastic 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,16 +32,13 @@ module Elastictastic
32
32
  def update(*ids, &block)
33
33
  [].tap do |found|
34
34
  case ids.length
35
- when 0 then return
35
+ when 0 then return []
36
36
  when 1
37
37
  id = ids.first
38
38
  instance = scoped({}).find_one(id, :preference => '_primary_first')
39
- if instance
40
- found << id
41
- instances = [instance]
42
- else
43
- instances = []
44
- end
39
+ return [] unless instance
40
+ found << id
41
+ instances = [instance]
45
42
  else
46
43
  instances = scoped({}).
47
44
  find_many(ids, :preference => '_primary_first')
@@ -1,3 +1,3 @@
1
1
  module Elastictastic
2
- VERSION = '0.11.1'
2
+ VERSION = '0.11.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastictastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: