search_me 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/search_me/filters.rb +5 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b87a278deb122720428b013b9047e4f11adb837
|
4
|
+
data.tar.gz: 3692c3b696ae12f6a8b7a5d70d54d3f4c4747038
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0286ce53c3a80fad1e9eeffc62406b42c61cc57198235b4b35d3621bbf4c100db43a847b1ee057c1527dc5db98160869d050d0fb19b25f7e42662173ac4937
|
7
|
+
data.tar.gz: 92e16c716568e91775ba2b17a1339b9e7720001b4aad5ab6d2957c73e5c561a7843eb37c755d4b29af8d431c8d27c1fbfb5af387007a2a0929a9aaa209915d82
|
data/lib/search_me/filters.rb
CHANGED
@@ -76,12 +76,11 @@ module SearchMe
|
|
76
76
|
|
77
77
|
private
|
78
78
|
def build_between_query_for(duration)
|
79
|
-
field = SearchMe.config.time_field
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
)
|
79
|
+
field = self.class.arel_table[SearchMe.config.time_field]
|
80
|
+
arel = field.eq(duration[0])
|
81
|
+
.or( field.gt(duration[0]).and(field.lt(duration[1])) )
|
82
|
+
.or( field.eq(duration[1]) )
|
83
|
+
where( arel )
|
85
84
|
end
|
86
85
|
|
87
86
|
def month_for_date(date)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: search_me
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jphager2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Uses LIKE to search attributes and return any objects of the model for
|
14
14
|
which a match is found
|