Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | We need to recorder here. Need to drop the order from default scope. | Arun Agrawal | 2011-09-05 | 1 | -1/+1 |
| | | | Fixes #2832 | ||||
* | Merge pull request #1807 from caius/find_in_batches_id_bug | Santiago Pastorino | 2011-07-14 | 1 | -2/+5 |
|\ | | | | | Bugfix by stopping find_in_batches using the records after yielding. | ||||
| * | Stop find_in_batches using the records after yielding. | Caius Durling | 2011-06-21 | 1 | -2/+5 |
| | | | | | | | | | | | | 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. | ||||
* | | Make `ActiveRecord::Batches#find_each` to not return `self`. | knapo | 2011-07-07 | 1 | -2/+0 |
|/ | | | | This caused that `find_each` was producing extra db call taking all the records from db, and was less efficient than `ActiveRecord::Base#all`. | ||||
* | Quote find_in_batches ORDER BY clause [#6620 state:resolved] | Andrew White | 2011-03-29 | 1 | -1/+1 |
| | |||||
* | Fix Typos: remove several occurences of the the | Nicholas Rowe | 2011-02-17 | 1 | -1/+1 |
| | |||||
* | ActiveRecord::Relation#primary_key should return a string, just like ↵ | Jon Leighton | 2011-01-03 | 1 | -3/+3 |
| | | | | ActiveRecord::Base.primary_key does. | ||||
* | un-nodocs AR::Batches | Xavier Noria | 2010-09-21 | 1 | -1/+1 |
| | |||||
* | avoid method_missing and reduce method calls | Aaron Patterson | 2010-09-10 | 1 | -1/+1 |
| | |||||
* | call to_a since we are not passing anything to all() | Aaron Patterson | 2010-08-04 | 1 | -1/+1 |
| | |||||
* | fisting indentation | Aaron Patterson | 2010-08-04 | 1 | -3/+3 |
| | |||||
* | Improve code from 231d7676f72947bae765b9bd885b134aaf949921 | Pratik Naik | 2010-05-09 | 1 | -7/+5 |
| | |||||
* | corrected AR find_each and find_in_batches to raise when the user uses ↵ | Josh Kalderimis | 2010-05-09 | 1 | -1/+8 |
| | | | | | | select but does not specify the primary key Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Warn scoped order and limit are ignored. [#4123 state:resolved] | Emilio Tagua | 2010-03-29 | 1 | -1/+5 |
| | |||||
* | adds missing requires for Object#blank? and Object#present? | Xavier Noria | 2010-03-28 | 1 | -0/+2 |
| | |||||
* | Move batch finders to Relation | Pratik Naik | 2010-02-12 | 1 | -0/+78 |