Skip to content
This repository was archived by the owner on Jun 30, 2018. It is now read-only.

Update deprecated ActiveRecord includes syntax #767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/tire/results/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ def __get_results_with_load(hits)
end

def __find_records_by_ids(klass, ids)
@options[:load] === true ? klass.find(ids) : klass.find(ids, @options[:load])
if @options[:load] == true
klass.find(ids)
else
klass.includes(@options[:load][:include]).find(ids)
end
end
end

Expand Down