Module: ActiveBlur::Searchable::ClassMethods
- Defined in:
- lib/active_blur/searchable.rb
Class Method Summary collapse
-
.extended(base) ⇒ Object
:nodoc:.
Instance Method Summary collapse
- #blur_reindex ⇒ Object
- #blur_search(query, options = {}) ⇒ Object
-
#searchable? ⇒ Boolean
Classes that have been defined as searchable return
true
for this method.
Class Method Details
.extended(base) ⇒ Object
:nodoc:
55 56 57 58 59 60 |
# File 'lib/active_blur/searchable.rb', line 55 def self.extended(base) #:nodoc: class <<base alias_method :search, :blur_search unless method_defined? :search alias_method :reindex, :blur_reindex unless method_defined? :reindex end end |
Instance Method Details
#blur_reindex ⇒ Object
66 67 68 |
# File 'lib/active_blur/searchable.rb', line 66 def blur_reindex() ActiveBlur.reindex(self) end |
#blur_search(query, options = {}) ⇒ Object
62 63 64 |
# File 'lib/active_blur/searchable.rb', line 62 def blur_search(query, = {}) ActiveBlur.search(self, query, ) end |
#searchable? ⇒ Boolean
Classes that have been defined as searchable return true
for this method.
Returns
true
78 79 80 |
# File 'lib/active_blur/searchable.rb', line 78 def searchable? true end |