1. 22 9月, 2012 1 次提交
  2. 16 9月, 2012 1 次提交
  3. 03 8月, 2012 1 次提交
  4. 28 7月, 2012 1 次提交
  5. 18 7月, 2012 1 次提交
  6. 31 5月, 2012 1 次提交
  7. 28 5月, 2012 1 次提交
  8. 14 4月, 2012 1 次提交
  9. 05 9月, 2011 1 次提交
  10. 07 7月, 2011 1 次提交
  11. 22 6月, 2011 1 次提交
    • C
      Stop find_in_batches using the records after yielding. · 96be08de
      Caius Durling 提交于
      Currently if the code that calls .find_in_batches modifies the yielded array in place then .find_in_batches can enter an infinite loop searching with ruby object ids in the database instead of the primary key of records in the database. This happens because it naively assumes the yielded array hasn't been modified before calling #id on the last object in the array. And ruby (1.8 at least) alias' #id to #object_id so an integer is still returned no matter what the last object is.
      
      By moving finding the #id of the last object before yielding the array it means the calling code can do whatever it wants to the array in terms of modifying it in place, and .find_in_batches doesn't care.
      96be08de
  12. 30 3月, 2011 1 次提交
  13. 18 2月, 2011 1 次提交
  14. 04 1月, 2011 1 次提交
  15. 22 9月, 2010 1 次提交
  16. 11 9月, 2010 1 次提交
  17. 05 8月, 2010 2 次提交
  18. 09 5月, 2010 2 次提交
  19. 29 3月, 2010 1 次提交
  20. 28 3月, 2010 1 次提交
  21. 13 2月, 2010 1 次提交