Skip to content

Commit 527e207

Browse files
committed
[MODEL] Fixed incorrect instruction how to extract functionality into a Searchable concern
Due to changing the delegation framework to ActiveSupport::Delegate, the documented pattern of using class methods defined in `ClassMethods` stopped working. The documentation has been changed after small research of alternative solutions. Thanks to @zzet for outlining the fix. Closes elastic#20
1 parent 618b7f2 commit 527e207

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

elasticsearch-model/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ module Searchable
7676
mapping do
7777
# ...
7878
end
79-
end
8079

81-
module ClassMethods
82-
def search(query)
80+
def self.search(query)
8381
# ...
8482
end
8583
end

0 commit comments

Comments
 (0)