Class: ThinkingSphinx::ActiveRecord::Field

Inherits:
Property
  • Object
show all
Includes:
Core::Field
Defined in:
lib/thinking_sphinx/active_record/field.rb

Instance Attribute Summary

Attributes inherited from Property

#columns, #model, #options

Instance Method Summary collapse

Methods included from Core::Field

#infixing?, #prefixing?

Methods inherited from Property

#initialize, #name, #rebase, #source_type

Methods included from Core::Property

#facet?, #multi?, #type

Constructor Details

This class inherits a constructor from ThinkingSphinx::ActiveRecord::Property

Instance Method Details

#file?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/thinking_sphinx/active_record/field.rb', line 7

def file?
  options[:file]
end

#with_attribute?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/thinking_sphinx/active_record/field.rb', line 11

def with_attribute?
  options[:sortable] || options[:facet]
end

#wordcount?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/thinking_sphinx/active_record/field.rb', line 15

def wordcount?
  options[:wordcount]
end