rad_core_rails 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '014856ac16f8d40063feb80c47e97120f02ddcf2f8a6717fad3472aefb6c0e4b'
4
- data.tar.gz: d0ec03250fb3b8b868ce3694b3d029b86469563d9fede11fb8b34b690ea2fef5
3
+ metadata.gz: 82f95dfd6c84c8aa3594f89b742563c9d2d07c0637ae18432acabd352c6ff088
4
+ data.tar.gz: bf435325dc6b733c186167a643c07330d10da47fa165328b14465109986af93e
5
5
  SHA512:
6
- metadata.gz: 410ed03d6ddd007f220ce1ceeeea8cedc1a7df95b044d8417ed7d11a00579b8eb980befc9fc2fc81dde7131502dcba08bb1d462bb50a0fe34cf577be9e606a27
7
- data.tar.gz: 4a1fe8b16e4bda9f0631624cd769d67610a67efbd6c59e012c0c68b13f8b50496fbc8e5e08a3a6c69a5280537bf30f77a0cd55064537253224950e577c587a02
6
+ metadata.gz: 5e47b6b0a09ff8f6b77c8b97b59664e8b03180e1f1ed461b6a37eef2a0bd59431195055c33e565c2244c0ffa56708dfd186b35dcc2c9f3ccfbb5acfa66a39f1c
7
+ data.tar.gz: 2205ff6ff6494d0f770b69f896b26e5075c23da826ca964f2edafd2dba7f3cee7f0add929538ec755fc65f44e10142847ba269223c1acae2f9f4c7637fcaec83
@@ -179,14 +179,18 @@ module RadCoreRails
179
179
  end
180
180
 
181
181
  def generate_model_clause(column_name, filter, optional_exclusion_clause = nil)
182
- str = if optional_exclusion_clause.present? && filter[:option] == '!='
183
- optional_exclusion_clause
184
- else
185
- # probably should fix this.
186
- # somtimes we arent sending a filter option, so just default it to =
187
- "(#{column_name} #{filter[:option] || '='} ANY(ARRAY[?]))"
188
- end
189
- args = [filter[:values]]
182
+ if optional_exclusion_clause.present? && filter[:option] == '!='
183
+ str = optional_exclusion_clause
184
+ args = [filter[:values]]
185
+ elsif filter[:option] == '!!'
186
+ str = "(#{column_name} IS NULL)"
187
+ args = []
188
+ else
189
+ # probably should fix this.
190
+ # somtimes we arent sending a filter option, so just default it to =
191
+ str = "(#{column_name} #{filter[:option] || '='} ANY(ARRAY[?]))"
192
+ args = [filter[:values]]
193
+ end
190
194
 
191
195
  [str, args]
192
196
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RadCoreRails
4
- VERSION = '0.8.3'
4
+ VERSION = '0.8.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rad_core_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleksandr Poltavets, James Marrs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-04 00:00:00.000000000 Z
11
+ date: 2021-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport