Module: Tire::Model::Import::ClassMethods

Included in:
Search::ClassMethodsProxy
Defined in:
lib/tire/model/import.rb

Instance Method Summary collapse

Instance Method Details

#import(options = {}, &block) ⇒ Object



16
17
18
19
20
# File 'lib/tire/model/import.rb', line 16

def import options={}, &block
  options = { :method => 'paginate' }.update options
  index   = options[:index] ? Tire::Index.new(options.delete(:index)) : self.index
  index.import klass, options, &block
end