xapor 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
1
+ 0.0.12
@@ -1,9 +1,6 @@
1
1
  module Xapor::ModelIntegration
2
2
  def self.included(base)
3
3
  base.send(:include, Xapor::XapianFuIntegration)
4
- if defined?(ActiveRecord) && base.is_a?(ActiveRecord::Base)
5
- base.after_save :add_to_index
6
- end
7
4
  end
8
5
  end
9
6
 
@@ -49,6 +46,9 @@ module Xapor::XapianFuIntegration
49
46
  @config.search_fields.each do |field|
50
47
  class_eval("def self.search_by_#{field}(query)\nself.search(query)\nend")
51
48
  end
49
+ if defined? ActiveRecord && ancestors.includes(ActiveRecord::Base)
50
+ class_eval("after_save :add_to_index")
51
+ end
52
52
  end
53
53
  end
54
54
 
data/xapor.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{xapor}
8
- s.version = "0.0.11"
8
+ s.version = "0.0.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Workman"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 11
9
- version: 0.0.11
8
+ - 12
9
+ version: 0.0.12
10
10
  platform: ruby
11
11
  authors:
12
12
  - David Workman