elastic_searchable 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/elastic_searchable.gemspec +1 -1
- data/lib/elastic_searchable/active_record.rb +3 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/elastic_searchable.gemspec
CHANGED
@@ -52,13 +52,13 @@ module ElasticSearchable
|
|
52
52
|
self.run_callbacks(:after_index)
|
53
53
|
end
|
54
54
|
def should_index?
|
55
|
-
[self.class.elastic_options[:if]].flatten.compact.all? { |m|
|
56
|
-
![self.class.elastic_options[:unless]].flatten.compact.any? { |m|
|
55
|
+
[self.class.elastic_options[:if]].flatten.compact.all? { |m| evaluate_elastic_condition(m) } &&
|
56
|
+
![self.class.elastic_options[:unless]].flatten.compact.any? { |m| evaluate_elastic_condition(m) }
|
57
57
|
end
|
58
58
|
|
59
59
|
private
|
60
60
|
#ripped from activesupport
|
61
|
-
def
|
61
|
+
def evaluate_elastic_condition(method)
|
62
62
|
case method
|
63
63
|
when Symbol
|
64
64
|
self.send method
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_searchable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|