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 +4 -4
- data/lib/rad_core_rails/query_generator.rb +12 -8
- data/lib/rad_core_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82f95dfd6c84c8aa3594f89b742563c9d2d07c0637ae18432acabd352c6ff088
|
4
|
+
data.tar.gz: bf435325dc6b733c186167a643c07330d10da47fa165328b14465109986af93e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2021-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|