Skip to content

Commit

Permalink
Optimize grouped_objects method (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyromaniac committed Apr 23, 2016
1 parent d354acf commit b0a5206
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/chewy/type/adapter/orm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ def load_scope_objects(scope, additional_scope = nil)
scope
end
end

def grouped_objects(objects)
options[:delete_if] ? super : { index: objects.to_a }
end
end
end
end
Expand Down

0 comments on commit b0a5206

Please sign in to comment.