es-elasticity 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c68c0531188ec748580e9dca08ef476d93d2b5f
4
- data.tar.gz: 05c85b83b78bc01ada5940dfd1bf222de6fdacc0
3
+ metadata.gz: 3b76200d65a0e6774e76eef4ea2251d9cc509173
4
+ data.tar.gz: 1da42184260cbe560b050fd0177f01d7245ed524
5
5
  SHA512:
6
- metadata.gz: acd0da8c79ee7376bb7d1236ba444e238c1e046af0724d9a6357d51a3d16d4ead3ee357dc19ef646eaaa2d74a70572229732fc211b93eb1de412f8d6989e84b6
7
- data.tar.gz: d07b79d85935534f65ae761432dab36129094bbe0e9074b3fd9e406a34f74520886f4f1f7239daf7f96e770638b43c373e6780bc090e319046859bdd2db86143
6
+ metadata.gz: 3a649dc7bb0631b411f24eb9000ba477c224deb9d2e8876d8391e2176d95cb2e88aaa15820c80d8eb5f92f0118682f96840b0bac71924c5af629613b8ce9cbf5
7
+ data.tar.gz: 67f7d70d8559fcd8167de2c9c32412a3eb5e43b588fdfe87ba01d98ff10eb01a76af57fcfd387b524892c128bec86f50f0d1246471d12138fcbc037ae0561cc7
@@ -179,8 +179,9 @@ module Elasticity
179
179
  ids = hits.map { |hit| hit["_id"] }
180
180
 
181
181
  if ids.any?
182
- id_col = "#{relation.connection.quote_column_name(relation.table_name)}.#{relation.connection.quote_column_name(relation.klass.primary_key)}"
183
- relation.where("#{id_col} IN (?)", ids).order("FIELD(#{id_col},#{ids.join(',')})")
182
+ id_col = "#{relation.connection.quote_column_name(relation.table_name)}.#{relation.connection.quote_column_name(relation.klass.primary_key)}"
183
+ id_vals = ids.map { |id| relation.connection.quote(id) }
184
+ relation.where("#{id_col} IN (?)", ids).order("FIELD(#{id_col}, #{id_vals.join(',')})")
184
185
  else
185
186
  relation.none
186
187
  end
@@ -224,8 +225,8 @@ module Elasticity
224
225
  metadata[:suggestions]
225
226
  end
226
227
 
227
- def method_missing(name, *args, **options, &block)
228
- filtered_relation.public_send(name, *args, **options, &block)
228
+ def method_missing(name, *args, &block)
229
+ filtered_relation.public_send(name, *args, &block)
229
230
  end
230
231
 
231
232
  private
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: es-elasticity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Kochenburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-19 00:00:00.000000000 Z
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler