simple_form_ransack 0.0.9 → 0.0.10

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: c670bef9f7e81bbf80871cddc5983364f717c78e
4
- data.tar.gz: 461f3051115cfd04d3dad711529b7042c397f99d
3
+ metadata.gz: 5b4c0e122f80c13f24d01d45df9b5dbdab1500bc
4
+ data.tar.gz: d805d5d2b30de2c16e9559813de19dfc01cf96ed
5
5
  SHA512:
6
- metadata.gz: 6236a76ac3366d9e2b2f8f4531ffc862c2fb115b5b34626d8f5deac08e1943ae1f04a0bc97b1d719ecc439e358c165b0a969438fe343bcc1090e220c4ea354bb
7
- data.tar.gz: cbb81b7ab1a7ebbce488778b59d317836953848b50cbb4f1e1a0d3455e5b6824ea3ae16a06e2ed775cafbc96c8a649bd60fcb2907db83ecf6f8fa920edb103d9
6
+ metadata.gz: d455e609222521307cc50fc1f664220ed987997613df53b761434a7cf38519413bd418fcf5e187480247a3d06be62a76a235c7b9b34f96317f232e177b42181a
7
+ data.tar.gz: 7fc9f976a887e44919f4c3e25d2aaed4fe67129b0f3ea53b32f0887cc333a97f5cfb13c98198476499fe70b48f376905ec37574c34869ae522f3f3f94b248706
@@ -116,7 +116,9 @@ private
116
116
  end
117
117
 
118
118
  def real_name(name, opts)
119
- match = name.to_s.match(/^(.+)_(eq|cont|eq_any|gteq|lteq|gt|lt|start|end)$/)
119
+ predicates = Ransack::Configuration.predicates.map(&:first).
120
+ map { |predicate| Regexp.escape(predicate) }.join("|")
121
+ match = name.to_s.match(/^(.+)_(#{predicates})$/)
120
122
  if match
121
123
  return match[1]
122
124
  else
@@ -1,3 +1,3 @@
1
1
  module SimpleFormRansack
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_ransack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Johansen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-27 00:00:00.000000000 Z
11
+ date: 2016-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails