visual_condition_builder 2.2.6 → 2.2.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e48dcc5fbe67ea243f5b16e2da10451f1c1c5bc8
|
4
|
+
data.tar.gz: 4f94d4ecac656821e93f095318c670a5f30fcc68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3967f3ca4279db6f645922ba05260adccf2d4871dc426728c91ecd776c9881e3ac0f365b47d61fcc8dcf6ea9bbfe254768e2bdc0f2f576ce3269ebb099ba2549
|
7
|
+
data.tar.gz: 4f799ac372ffa99ec5cc5e90a7e83b452f9390dcdadad530d8e8087c66bbc715660432d3791ccb5be8120d60ac25f1e7af3377b2bfd9f02d3f17e5bff6dc1f6a
|
@@ -2,7 +2,7 @@ module VisualConditionBuilder
|
|
2
2
|
class Converter
|
3
3
|
def self.to_ransack(params)
|
4
4
|
ransack_q = {}
|
5
|
-
conditions = params.is_a?(
|
5
|
+
conditions = params.is_a?(String) ? JSON.parse(params ||= '[]') : params
|
6
6
|
conditions.map do |p|
|
7
7
|
case p[1].to_s.downcase.to_sym
|
8
8
|
when :between
|
@@ -37,7 +37,7 @@ module VisualConditionBuilder
|
|
37
37
|
|
38
38
|
def self.to_mongo(params)
|
39
39
|
query = []
|
40
|
-
conditions = params.is_a?(
|
40
|
+
conditions = params.is_a?(String) ? JSON.parse(params ||= '[]') : params
|
41
41
|
conditions.map do |p|
|
42
42
|
tmp = {}
|
43
43
|
case p[1].to_s.downcase.to_sym
|