Method: Elastics::ActiveRecord::SearchResult#initialize
- Defined in:
- lib/elastics/active_record/search_result.rb
#initialize(response, options = {}) ⇒ SearchResult
It expects :model option with a model-class. Optionally pass scope option with a lambda which takes and modifies relation.
7 8 9 10 11 |
# File 'lib/elastics/active_record/search_result.rb', line 7 def initialize(response, = {}) @model = [:model] @scope = [:scope] super response, end |