| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\ |
|
| |
| |
| | |
`reaping_frequency` is used in Active Record `reap_frequency` is not
|
|\ \
| | |
| | | |
Optimize select_value, select_values, select_rows in Postgresql adapter.
|
| | |
| | |
| | |
| | |
| | | |
whether to exec with cache for Postgresql adapter
Reduces creating unused objects, with the most dramatic reduction in select_values which used to map(&:first) an array of single element arrays.
|
|\ \ \
| |/ /
|/| | |
Fixed has_many association to make it support irregular inflections.
|
| | |
| | |
| | |
| | | |
So that irregular multi-word pluralization rules have to be defined only for snake-case strings.
|
|/ / |
|
|\ \
| | |
| | | |
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.
|
|\ \
| | |
| | | |
Refactor counter cache create and destroy
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
destroy
|
| | |
| | |
| | |
| | | |
create
|
| | |
| | |
| | |
| | | |
uuid_generate function was not being quoted.
|
|\ \ \
| | | |
| | | | |
use YAML.load_file in database tasks example
|
| | | |
| | | |
| | | |
| | | |
| | | | |
rather than YAML.load(File.read(path)). YAML.load_file is also used in
guides/rails_guides/helper.rb since 2011, the only other precedent I could find.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
968c581ea34b5236af14805e6a77913b1cb36238 have fixed the EagerLoadTest, but
not in the correct way.
The problem was when `empty?` or `size` was called on relation. It was
triggering `count(:all)`, which was passing `:all` as the column name to `count`
on Calculations.
On the other hand, the method `calculate` on Calculations was calling
`construct_relation_for_association_calculations` instead of `perform_calculation`,
because `has_include?` was returning `true` since `column_name` was present.
To prevent calling the wrong method to perform the calculation, we have to check
if the `column_name` is present and if it is different from `:all` (which is now used
to correctly do `count` with `select`).
More information here: https://github.com/rails/rails/commit/968c581ea34b5236af14805e6a77913b1cb36238#commitcomment-6006135
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| | |
[ci skip] Improve doc, fix grammatical issue
|
| | | |
|
|\ \ \
| | | |
| | | | |
Idempotent counter caches, fix concurrency issues with counter caches
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The second argument to serialize has double meaning:
* `class_name` of the Type to serialize
* `coder` to use then serializing.
The new variable name and the docs better describe that behavior.
|
| | | | |
|
|/ / / |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
laurocaetano/equality_between_relation_and_collection_proxy
The comparison between `Relation` and `CollectionProxy` should be consistent.
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | | |
consistent.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Example:
author.posts == Post.where(author_id: author.id)
# => true
Post.where(author_id: author.id) == author.posts
# => true
Fixes #13506
|
| | |
| | |
| | |
| | |
| | | |
we're guaranteed to pass a numeric value for offset, so if it's zero,
just don't add an offset to the query
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | | |
swoker/activerecord_fix_aggregate_methods_with_select
Activerecord fix aggregate methods with select
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
[Yves Senn & Matthew Draper]
|
| | |
| | |
| | |
| | | |
[Yves Senn & Matthew Draper]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
[ci skip]
The examples are written in a way you expect them to be executable.
However one snippet assumed there to be two comments when only one
was created above.
The defined models did not extend `ActiveRecord::Base`
The example used `comments.last.mark_for_destruction`. This does no
longer load the whole collection but just the last record. It is
then refetcht on subsequent calls to `last`. This breaks the example.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix insertion of records for hmt association with scope
Conflicts:
activerecord/CHANGELOG.md
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
Conflicts:
activerecord/CHANGELOG.md
activesupport/CHANGELOG.md
|
| | | | |
|
| | | | |
|