| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Conflicts:
activerecord/test/cases/validations/association_validation_test.rb
|
|
|
|
|
|
|
| |
Causes a double // in Dir.glob that breaks Ruby 2.2-trunk.
Not really a bug, but not relevant to this test either.
Originally added in ed21f0c50270139ddb6993acfdaea4586ffd09a3
|
|
|
|
|
|
| |
transactions.
Closes #14841.
|
|
|
|
| |
This file is using this pattern already
|
| |
|
|\
| |
| | |
Fix behavior of select! to be consistent with select #14752
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #14752
Select mimics the block interface of arrays, but does not mock the
block interface for select!. This change moves the api to be a
private method, _select!.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Properly handle scoping with has_many :through. Fixes #14537.
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/cases/associations/has_many_through_associations_test.rb
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
`warning: ambiguous first argument; put parentheses or even spaces`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also add a Changelog entry
[related #9702]
[fixes #8928]
|
|\ \ \
| | | |
| | | | |
Changed the NullRelation so that when count is called with #group it wil...
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
properly return an empty hash instead of zero. Fixes issue #14721
Conflicts:
activerecord/CHANGELOG.md
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
* This is a follow up to: fe4b0eee05f59831e1468ed50f55fbad0ce11e1d
* The originating PR is #14222
* It should fix the build
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closes #14222.
This is a follow up to #6104
This does not have the backwards compatibility issues brought up in
implementation to break.
|
| | |
| | |
| | |
| | | |
uuid_generate function was not being quoted.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
968c581ea34b5236af14805e6a77913b1cb36238 have introduced this bug #14744
on Association Relation when the method `empty?` or `size` was called.
Example:
# Given an author that does have 3 posts, but none of them with the
# title 'Some Title'
Author.last.posts.where(title: 'Some Title').size
# => 3
It was occurring, because the Association Relation had implemented these
methods based on `@association`, this way giving wrong results.
To fix it, was necessary to remove the methods `empty?` and `size` from
Association Relation. It just have to use these methods from Relation.
Example:
# Given an author that does have 3 posts, but none of them with the
# title 'Some Title'
Author.last.posts.where(title: 'Some Title').size
# => 0
# Now it will return the correct value.
Fixes #14744.
|
| | |
|
|\ \
| | |
| | | |
Idempotent counter caches, fix concurrency issues with counter caches
|
| | | |
|
|/ /
| |
| |
| | |
Follow up to af549a1ad6692d7e2c756750651f0e1b293f5185
|
| |
| |
| |
| | |
'AssociationRelation' is consistent.
|
| |
| |
| |
| | |
consistent.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Example:
author.posts == Post.where(author_id: author.id)
# => true
Post.where(author_id: author.id) == author.posts
# => true
Fixes #13506
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | | |
swoker/activerecord_fix_aggregate_methods_with_select
Activerecord fix aggregate methods with select
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
[Yves Senn & Matthew Draper]
|
| | |
| | |
| | |
| | | |
[Yves Senn & Matthew Draper]
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix insertion of records for hmt association with scope
Conflicts:
activerecord/CHANGELOG.md
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
Conflicts:
activerecord/CHANGELOG.md
activesupport/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | | |
cache.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
values.
With the changes introduced by 16b70fddd4dc7e7fb7be108add88bae6e3c2509b
it was expecting the value to be a Symbol, while it could be also a
String value.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
In passing, allow multi-word adapters to be referenced in a URL:
underscored_name must become hyphened-name.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The "DATABASE_URL_*" idea was moving in the wrong direction.
Instead, let's deprecate the situation where we end up using
ENV['DATABASE_URL'] at all: the Right Way is to explicitly include it in
database.yml with ERB.
|
| | | |
| | | |
| | | |
| | | | |
.. even when the supplied config made no hint that name was relevant.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If the supplied string doesn't contain a colon, it clearly cannot be a
database URL. They must have intended to do a key lookup, so even though
it failed, give the explanatory deprecation warning, and raise the
exception that lists the known configs.
Conveniently, this also simplifies our logical behaviour: if the string
matches a known configuration, or doesn't contain a colon (and is
therefore clearly not a URL), then we output a deprecation warning, and
behave exactly as we would if it were a symbol.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
configuration
|
| | | |
| | | |
| | | |
| | | |
| | | | |
As we like ENV vars, also support DATABASE_URL_#{env}, for more obscure
use cases.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The original attempt didn't really fix the problem and wasn't testing the
problematic area. This commit corrected those issues in the original commit.
Also removed the private `enum_mapping_for` method. As `defined_enums` is now a
method, this method doesn't provide much value anymore.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The reverse_order method was using a flag to control if the order should
be reversed or not. Instead of using this variable just build the reverse order
inside its proper method.
This implementation was leading to an unexpected behavior when using
reverse_order and then applying reorder(nil).
Example:
Before
Post.order(:name).reverse_order.reorder(nil)
# => SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC
After
Post.order(:name).reverse_order.reorder(nil)
# => SELECT "posts".* FROM "posts"
|
| |\ \ \
| | | | |
| | | | | |
Use connection-specific bytea escaping
|