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: 4596aae923f37f0628c5a4dd2197879b6a00260c
4
- data.tar.gz: b9c1d36ecf19d852a39fd0f9f6f1756cbaec1449
3
+ metadata.gz: e48dcc5fbe67ea243f5b16e2da10451f1c1c5bc8
4
+ data.tar.gz: 4f94d4ecac656821e93f095318c670a5f30fcc68
5
5
  SHA512:
6
- metadata.gz: 34035631b016918f186be5ed191f7c804dc8bd688e30b7c55941735787ed3d996dac0eae4cb1386330fd8719832e98dbdbb61d858a6a7136de170e3d52bf2c0d
7
- data.tar.gz: 1ab163643a37a9ec31307d60930112de4afea8e3fc51a051986604f7a878a9bd20f6fd9d49c010cba0a02ccc4777905fe0e4add73067acad3795e6b219360bca
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?(Array) ? params : JSON.parse(params ||= '[]')
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?(Array) ? params : JSON.parse(params ||= '[]')
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
@@ -1,3 +1,3 @@
1
1
  module VisualConditionBuilder
2
- VERSION = "2.2.6"
2
+ VERSION = "2.2.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visual_condition_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.6
4
+ version: 2.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Porto