Class: Sunspot::Type::AutosuggestType

Inherits:
AbstractType
  • Object
show all
Defined in:
lib/sunspot_autocomplete.rb

Overview

Auto Suggestion

Instance Method Summary collapse

Instance Method Details

#cast(string) ⇒ Object

:nodoc:



31
32
33
# File 'lib/sunspot_autocomplete.rb', line 31

def cast(string) #:nodoc:
  string
end

#indexed_name(name) ⇒ Object

:nodoc:



23
24
25
# File 'lib/sunspot_autocomplete.rb', line 23

def indexed_name(name) #:nodoc:
  "#{name}_as"
end

#to_indexed(value) ⇒ Object

:nodoc:



27
28
29
# File 'lib/sunspot_autocomplete.rb', line 27

def to_indexed(value) #:nodoc:
  value.to_s if value
end