Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

each_with_hit doesn't support includes to eager load associations #221

Closed
@sr3d

Description

collection.records.includes(:some_association).each_with_hit will error out: undefined method `each_with_hit' for #School::ActiveRecord_Relation:0x007fb13c51fe88

I looked around the source code and couldn't see it at all
(https://sourcegraph.com/github.com/elasticsearch/elasticsearch-rails@b500bf03d18f0852b9ee6ebc1aa15fe684f9a9f2/.tree/elasticsearch-model/lib/elasticsearch/model/response/records.rb). With Tire gem it's possible but somehow in the ES-Rails it's not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /