rokaki 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rokaki/filter_model.rb +18 -4
- data/lib/rokaki/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53244b10ca9f4942f648d825156616dfc9057cf8b5c39afa4f995152f8f56091
|
4
|
+
data.tar.gz: 30b6db3fe0f4c6e68a6b4f628e254c85dcc7b72aa387d1ec91b1f5cd3c674010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13df19ccfa76fc0265e7f12c0dacbb7c4dba8b07169db9a3c08c7368fe07cc9f50cbd2ea056490f0c6cff1dbafe550d28998c94ac339b0316d868a95e350a569
|
7
|
+
data.tar.gz: 164ea95d95555b85ac86cc81fd2b2b9dca2b2245246241c6d52b7f16c8357aaa9e6c67d446b2f79d1213162aa35ece8b420f10545cd448517e32a8802d500e93
|
data/Gemfile.lock
CHANGED
data/lib/rokaki/filter_model.rb
CHANGED
@@ -52,14 +52,28 @@ module Rokaki
|
|
52
52
|
|
53
53
|
def _chain_filter_type(key)
|
54
54
|
filter = "#{filter_key_prefix}#{key}"
|
55
|
+
query = ''
|
55
56
|
|
56
|
-
query = ''
|
57
57
|
if @_like_semantics && mode = @_like_semantics[key]
|
58
|
-
query = like_semantics(
|
58
|
+
query = like_semantics(
|
59
|
+
type: 'LIKE',
|
60
|
+
query: query,
|
61
|
+
filter: filter,
|
62
|
+
mode: mode,
|
63
|
+
key: key
|
64
|
+
)
|
65
|
+
|
59
66
|
elsif @i_like_semantics && mode = @i_like_semantics[key]
|
60
|
-
query = like_semantics(
|
67
|
+
query = like_semantics(
|
68
|
+
type: 'ILIKE',
|
69
|
+
query: query,
|
70
|
+
filter: filter,
|
71
|
+
mode: mode,
|
72
|
+
key: key
|
73
|
+
)
|
74
|
+
|
61
75
|
else
|
62
|
-
query = "@model.where(#{
|
76
|
+
query = "@model.where(#{key}: #{filter})"
|
63
77
|
end
|
64
78
|
|
65
79
|
query
|
data/lib/rokaki/version.rb
CHANGED