| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
This reverts commit 9d396ee8195e31f646e0b89158ed96f4db4ab38f, reversing
changes made to fa2bfd832c1d1e997d93c2269a485cc74782c86d.
Reason: the change broke the build.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 04cc446d178653d362510e79a22db5300d463161.
I reverted it because apparently we want to use: select([:a, :b])
instead of select(:a, :b), but there was no tests for that form.
|
| |
|
| |
|
| |
|
|
|
|
| |
generates valid SQL
|
|\
| |
| | |
Bugfix by stopping find_in_batches using the records after yielding.
|
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Log instrumentation name for exists? queries
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
respond to empty?
having raises NoMethodError: undefined method `empty?' when a Fixnum or Date/Time were passed via varargs
|
| | |
| | |
| | |
| | | |
This caused that `find_each` was producing extra db call taking all the records from db, and was less efficient than `ActiveRecord::Base#all`.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Addresses an inconsistency in the ActiveRecord::Base.method_missing handl
|
| | | |
| | | |
| | | |
| | | | |
of dynamic finder methods and the passing of the &block parameter for :find_by_attributes.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
In order make Relation behavior closer to Array
Made Relation#sum to accept block and delegate it to Array#sum
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
test surrounding create_with(nil) behavior
|
| |/ /
|/| | |
|
| |/
|/| |
|
| |
| |
| |
| |
| | |
Set reverse_order_value when asked to reverse_order().
Do the actual reversal in build_arel.
|
| |
| |
| |
| | |
in the default scope. Fixes #1395.
|
|\ \
| |/
|/|
| |
| |
| | |
Conflicts:
actionmailer/lib/action_mailer/base.rb
activesupport/lib/active_support/core_ext/kernel/requires.rb
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
- If doing a count on a relation that has an :include and a :join, it does a distinct even though it should not.
- When doing a count on a relation that has an :include, it always falls back to a old style left join when performing the count. Looks like it was broken here:
https://github.com/rails/rails/commit/b9599502c9e738a5a1513e75d08f8d40ed408265
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
if a query contains a limit or an offset, ActiveRecord::FinderMethods#find_last had inconsistent behavior.
If the records were loaded, it returned the last record in the cached list.
If they were not, it reversed the order of the query and changed the limit to one.
If the earlier limit was less than the total matching the query in the db,
it would return a different record than if the records had been cached.
This commit changes find_last so that it loads the records when getting the
last record on a query containing a limit or an offset, which makes the behavior consistent.
|
|/
|
|
| |
calculation queries. Fixes #406.
|
| |
|
|
|
|
| |
attributes= in AR in favor of assign_attributes(attrs, :without_protection => true)
|
| |
|
| |
|
|
|
|
| |
problems with default scopes getting included into other scopes and then being unable to remove the default part via unscoped.
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master: (51 commits)
order is not guaranteed by this select, so add an order and call first!
oracle stores this with microseconds, so convert to seconds before comparing
make sure that active connections are not cleared during test when an exception happens
clearing active connections in the ConnectionManagement middleware if an exception happens
proxy body responses so we close database connections after body is flushed
Pass the proper method_name instead of hardcoding to action_name.
Quote find_in_batches ORDER BY clause [#6620 state:resolved]
Delegate first!, last!, any? and many? to scoped
Dont call authenticate_or_request_with_http_basic twice
Remove 'warning: ambiguous first argument' when running ActionPack tests
Change exists? so that it doesn't instantiate records [#6127 state:resolved]
Move mapper_test to the appropriate location
Update the wildcard route to be non-greedy by default, therefore be able to match the (.:format) segment [#6605 state:resolved]
Fix examples
Added Base.http_basic_authenticate_with to do simple http basic authentication with a single class method call [DHH]
make sure we have an active database connection before running each connection management test
adding active_connections? to the connection pool for finding open connections
adding active_connection? to the connection pool
testing app delegation from the ConnectionManagement middleware
namespacing connection management tests. :heart:
...
|
| | |
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| |
| |
| |
| | |
arguments in their API docs
|
| | |
|
| | |
|
| | |
|
|\| |
|
| | |
|