Module: ActiveBlur::Searchable::ClassMethods

Defined in:
lib/active_blur/searchable.rb

Class Method Summary collapse

Instance Method Summary collapse

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_reindexObject



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,options = {})
  ActiveBlur.search(self, query, options)
end

#searchable?Boolean

Classes that have been defined as searchable return true for this method.

Returns

true

Returns:

  • (Boolean)


78
79
80
# File 'lib/active_blur/searchable.rb', line 78

def searchable?
  true
end