| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Also add a Changelog entry
[related #9702]
[fixes #8928]
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
SQL statements for querying associations are now cached
|
|\| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* master: (70 commits)
[ci skip] Added link to ruby-lang.org installation.
Use the index on hidden field
`collection_check_boxes` respects `:index` option for the hidden filed name.
docs, double meaning of `serialize` argument. Closes #14284.
Just call read_attribute, no need to use `send`.
- Fix lingering reference to `:text` instead of the newer `:plain` - Section references `form_tag` instead of the `form_for` used in the example
again, read_attribute is public, so just call it
read_attribute is public, so we should just call it
Disable assest cache store in docs [ci skip]
Make counter cache decrementation on destroy idempotent
Write the failing test case for concurrent counter cache
[ci skip] Use plain underscore instead of "\_".
Update documentation to use Rails.application instead
Add a changelog entry for #14546 [ci skip]
Move tests for deep_dup and duplicable to object directory
Missing 'are' in note - [ci skip]
CollectionHelpers now accepts a readonly option
Fix a few typos [ci skip]
Bundle tzinfo-data on :x64_mingw (64-bit Ruby on Windows).
don't bother with an offset if the offset is zero
...
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
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.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Follow up to af549a1ad6692d7e2c756750651f0e1b293f5185
|
| | | | | | | | |
|
| |/ / / / / / |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
laurocaetano/equality_between_relation_and_collection_proxy
The comparison between `Relation` and `CollectionProxy` should be consistent.
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
'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
|
| | |/ / / / /
| |/| | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | | | | | | |
|
| | | | | | | |
|