| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Like rake tasks and runner blocks these blocks should also being shared
between applications since they are stored at the classes.
Fixes #14748
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When requesting a controller with the following code with a unknown format:
def my_action
respond_to do |format|
format.json { head :ok }
format.any { render text: 'Default response' }
end
end
we should render the default response instead of raising ActionController::UnknownFormat
Fixes #14462
Conflicts:
actionpack/CHANGELOG.md
actionpack/test/controller/mime/respond_with_test.rb
Conflicts:
actionpack/CHANGELOG.md
|
| |
|
|\
| |
| | |
[ci skip] Improve doc, fix grammatical issue
|
| | |
|
|\ \
| | |
| | | |
Idempotent counter caches, fix concurrency issues with counter caches
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Reference and link to install RVM in the Getting Started Guide. [ci skip]
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
`collection_check_boxes` respects `:index` option for the hidden filed name
|
| |/ /
| | |
| | |
| | | |
closes #14147
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
Fix some inconsistent references between text and example code in getting started guide [ci skip]
|
| | | |
| | | |
| | | |
| | | | |
- Section references `form_tag` instead of the `form_for` used in the example
|
|\ \ \ \
| |/ / /
|/| | | |
Just call read_attribute, no need to use send.
|
|/ / /
| | |
| | |
| | | |
Follow up to af549a1ad6692d7e2c756750651f0e1b293f5185
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Disable assest cache store in docs [ci skip]
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
[ci skip] Use plain underscore instead of "\_". [ci skip]
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | | |
| | | | |
Move tests for deep_dup and duplicable to object directory
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
CollectionHelpers now accepts a readonly option
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
mcmorgan/update-documentation-to-match-generated-config
Update documentation to use Rails.application instead
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
References to ``AppName::Application` removed in favour of ``Rails.application``
as generated with a new rails 4.1 app.
[ci skip]
|
|\ \ \ \
| |/ / /
|/| | | |
Add a changelog entry for #14546 [ci skip]
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Missing 'are' in note - [ci skip]
|
|/ / /
| | |
| | | |
This is in the note at the end of Section 2: Controller Naming Convention. [ci skip]
|
| | |
| | |
| | |
| | | |
This is a follow up to 545afc15.
|
|\ \ \
| | | |
| | | | |
Bundle tzinfo-data on :x64_mingw (64-bit Ruby on Windows).
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | | |
we're guaranteed to pass a numeric value for offset, so if it's zero,
just don't add an offset to the query
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Change links to 37signals and svn blog to point to new destinations. [ci skip]
|
|/ / |
|
|/ |
|