- 17 2月, 2016 1 次提交
-
-
由 Akshay 提交于
- The change was added in #23099
-
- 18 1月, 2016 1 次提交
-
-
由 Vipul A M 提交于
Changed options for find_each and variants to have options start/finish instead of start_at/end_at based on comments at https://github.com/rails/rails/pull/12257#issuecomment-74688344
-
- 26 8月, 2015 1 次提交
-
-
由 Ronak Jangir 提交于
-
- 07 8月, 2015 1 次提交
-
-
由 Sina Siadat 提交于
`in_batches` yields Relation objects if a block is given, otherwise it returns an instance of `BatchEnumerator`. The existing `find_each` and `find_in_batches` methods work with batches of records. The new API allows working with relation batches as well. Examples: Person.in_batches.each_record(&:party_all_night!) Person.in_batches.update_all(awesome: true) Person.in_batches.delete_all Person.in_batches.map do |relation| relation.delete_all sleep 10 # Throttles the delete queries end
-
- 29 3月, 2015 1 次提交
-
-
由 yuuji.yaginuma 提交于
-
- 25 3月, 2015 1 次提交
-
-
由 Cody Cutrer 提交于
the newer method used for discriminating new records did not use the older and more robust method used for instantiating existing records, but did have a better post-check to ensure the sublass was in the hierarchy. so move the descendants check to find_sti_class, and then simply call find_sti_class from subclass_from_attributes now with fixed specs
-
- 17 2月, 2015 1 次提交
-
-
由 Vipul A M 提交于
Deprecated passing of `start` value to `find_in_batches` and `find_each` in favour of `begin_at` value.
-
- 09 2月, 2015 1 次提交
-
-
由 Vipul A M 提交于
that complements the `start`parameter to specify where to stop batch processing
-
- 06 2月, 2014 2 次提交
-
-
由 Marc-Andre Lafortune 提交于
-
由 Marc-Andre Lafortune 提交于
-
- 30 1月, 2014 1 次提交
-
-
由 Marc-Andre Lafortune 提交于
-
- 21 1月, 2014 1 次提交
-
-
由 Alexander Balashov 提交于
Before this patch find_in_batches raises this error only on second iteration. So you will know about the problem only when you get the batch size threshold.
-
- 06 12月, 2013 1 次提交
-
-
由 Marc-Andre Lafortune 提交于
can be chained with other `Enumerable` methods.
-
- 28 6月, 2013 1 次提交
-
-
由 Dmitry Polushkin 提交于
-
- 19 6月, 2013 1 次提交
-
-
由 Ben Woosley 提交于
This lets us do things like call: .find_each.with_index
-
- 21 5月, 2013 1 次提交
-
-
由 Alexander Balashov 提交于
-
- 28 3月, 2013 2 次提交
-
-
由 Prathamesh Sonpatki 提交于
-
由 Alexander Balashov 提交于
-
- 19 3月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 31 10月, 2012 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Alexis Bernard 提交于
-
- 22 9月, 2012 3 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
Related to 761bc751 and eb876c4d
-
由 Santiago Pastorino 提交于
This reverts commit 761bc751. This commit wasn't fixing any issue just using the same table for different models with different primary keys.
-
- 16 9月, 2012 1 次提交
-
-
由 Toshiyuki Kawanishi 提交于
-
- 03 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
-
- 27 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
-
- 27 4月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 05 9月, 2011 2 次提交
-
-
由 Arun Agrawal 提交于
-
由 Arun Agrawal 提交于
Fixes #2832
-
- 07 7月, 2011 1 次提交
-
-
由 knapo 提交于
This caused that `find_each` was producing extra db call taking all the records from db, and was less efficient than `ActiveRecord::Base#all`.
-
- 22 6月, 2011 1 次提交
-
-
由 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.
-
- 07 6月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 05 6月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
-
- 30 3月, 2011 1 次提交
-
-
由 Andrew White 提交于
-
- 15 1月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 19 10月, 2010 1 次提交
-
-
由 Jon Leighton 提交于
-
- 03 10月, 2010 1 次提交
-
-
由 Jon Leighton 提交于
Fix the tests (I have actually verified that these are also the 'right' fixes, rather than just making the tests pass again)
-
- 09 5月, 2010 1 次提交
-
-
由 Josh Kalderimis 提交于
corrected AR find_each and find_in_batches to raise when the user uses select but does not specify the primary key Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 29 3月, 2010 1 次提交
-
-
由 Emilio Tagua 提交于
-