Module: SunspotCell::DSL::Fields::InstanceMethods

Defined in:
lib/sunspot_cell/dsl/fields.rb

Instance Method Summary collapse

Instance Method Details

#attachment(*names) ⇒ Object

Added an attachment field, the attachment filename is passed to Solr for indexing by tiqa



16
17
18
19
20
21
# File 'lib/sunspot_cell/dsl/fields.rb', line 16

def attachment(*names)
  options = names.pop if names.last.is_a?(Hash)
  names.each do |name|
    @setup.add_attachment_field_factory(name, options || {})
  end
end