diff --git a/README.md b/README.md index 4789f03..f4d18fa 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,7 @@ end For batches where the value is some kind of collection, such as an Array or Hash, `loader` also supports being called with a block, which yields the _current_ value, and returns the _next_ value. This is extremely useful for 1:Many relationships: ```ruby -BatchLoader.for(user.id).batch(default_value: []) do |comment_ids, loader| +BatchLoader.for(user.id).batch(default_value: []) do |user_ids, loader| Comment.where(user_id: user_ids).each do |comment| loader.call(comment.user_id) { |memo| memo << comment } end