File tree 1 file changed +16
-13
lines changed
elasticsearch-model/lib/elasticsearch/model
1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -8,20 +8,23 @@ module Model
8
8
#
9
9
module Importing
10
10
11
- module ClassMethods
11
+ # When included in a model, adds the importing methods.
12
+ #
13
+ # @example Import all records from the `Article` model
14
+ #
15
+ # Article.import
16
+ #
17
+ # @see #import
18
+ #
19
+ def self . included ( base )
20
+ base . __send__ :extend , ClassMethods
12
21
13
- # When included in a model, adds the importing methods.
14
- #
15
- # @example Import all records from the `Article` model
16
- #
17
- # Article.import
18
- #
19
- # @see #import
20
- #
21
- def self . included ( base )
22
- adapter = Adapter . from_class ( base )
23
- base . __send__ :include , adapter . importing_mixin
24
- end
22
+ adapter = Adapter . from_class ( base )
23
+ base . __send__ :include , adapter . importing_mixin
24
+ base . __send__ :extend , adapter . importing_mixin
25
+ end
26
+
27
+ module ClassMethods
25
28
26
29
# Import all model records into the index
27
30
#
You can’t perform that action at this time.
0 commit comments