Class: ThinkingSphinx::Middlewares::ActiveRecordTranslator::Inner

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/middlewares/active_record_translator.rb

Instance Method Summary (collapse)

Constructor Details

- (Inner) initialize(context)



15
16
17
# File 'lib/thinking_sphinx/middlewares/active_record_translator.rb', line 15

def initialize(context)
  @context = context
end

Instance Method Details

- (Object) call



19
20
21
22
# File 'lib/thinking_sphinx/middlewares/active_record_translator.rb', line 19

def call
  results_for_models # load now to avoid segfaults
  context[:results] = context[:results].collect { |row| result_for(row) }
end