ocean-rails 1.25.0 → 1.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/api_resource.rb +8 -5
- data/lib/ocean/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb4ad2372d6dff1a25460793b4e953dd31b592a9
|
4
|
+
data.tar.gz: de69dc5015dabaa738b1212e322182ea648860a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e5771f4439ea8dad68a8a4f074d97cabd6a8c1bf206cc63f73c1c0825114627be5ca00c44e3086f00fe4dcceda8e80d81885fa2eb3bee098b0a588fcfd1b4e1
|
7
|
+
data.tar.gz: c305deeb97a55bb63428144c1289b8827c5d78312b886fd75e63b263a7b89b8fc1079957cb85110be9185a99fdeb8dc5d2352e08a16dcc8e1db0757e2c4fa6ca
|
data/lib/ocean/api_resource.rb
CHANGED
@@ -47,13 +47,16 @@ module ApiResource
|
|
47
47
|
def collection_internal(conds={}, group, search, page, page_size)
|
48
48
|
if index_only != []
|
49
49
|
new_conds = {}
|
50
|
-
ranges = {}
|
51
50
|
index_only.each do |key|
|
52
51
|
val = conds[key]
|
53
|
-
next
|
54
|
-
if ranged_matchers.include?(key)
|
55
|
-
|
56
|
-
|
52
|
+
next unless val
|
53
|
+
if ranged_matchers.include?(key)
|
54
|
+
if val.include?(",")
|
55
|
+
from, to = val.split(",")
|
56
|
+
new_conds[key] = Range.new(DateTime.parse(from), DateTime.parse(to))
|
57
|
+
else
|
58
|
+
new_conds[key] = DateTime.parse(val)
|
59
|
+
end
|
57
60
|
else
|
58
61
|
new_conds[key] = val
|
59
62
|
end
|
data/lib/ocean/version.rb
CHANGED