activesearch 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,8 +17,9 @@ module ActiveSearch
17
17
 
18
18
  def store_fields(original, fields, options)
19
19
  if options && options[:store]
20
+ self._stored = {}
20
21
  options[:store].each do |f|
21
- self._stored[f] = original[f] if original.send("#{f}_changed?")
22
+ self._stored[f] = original[f] if original[f].present?
22
23
  end
23
24
  end
24
25
  end
@@ -42,7 +43,6 @@ module ActiveSearch
42
43
  end
43
44
 
44
45
  def self.reindex(original, fields, options)
45
- return unless fields.any? { |f| original.send("#{f}_changed?") }
46
46
  doc = find_or_initialize_by(_original_type: original.class.to_s, _original_id: original.id)
47
47
  doc.store_fields(original, fields, options)
48
48
  doc.refresh_keywords(original, fields)
@@ -1,3 +1,3 @@
1
1
  module ActiveSearch
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: