| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Child joins should be aliased when merging relations
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rails 5.2 does not alias child joins, causing an error about duplicated table/fields:
Example:
Using some code like:
`Post.joins(:author, :categorizations).merge(Author.select(:id)).merge(Categorization.joins(:author))`
*Before this fix:*
`
SELECT ... FROM "posts" INNER JOIN "authors" ON ... INNER JOIN "authors" ON ...
`
*After this fix:*
`
SELECT ... FROM "posts" INNER JOIN "authors" ON ... INNER JOIN "authors" "authors_categorizations" ON ...
`
Before 5.2, Rails aliased the joins, but wrongfully transformed them into a LEFT OUTER JOIN.
This fix will keep them as INNER JOINS, but make sure child joins are aliased, to avoid errors.
|
|\
| |
| | |
PERF: avoid allocating column names where possible
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When requesting columns names from database adapters AR:Result
would dup/freeze column names, this prefers using fstrings which
cuts down on repeat allocations
Attributes that are retained keep these fstrings around for the long
term
Note, this has the highest impact on "short" result sets, eg: Topic.first where you can void allocating the number of columns * String.
|
|\ \
| | |
| | | |
Migrations will raise an exception if there are multiple column defin…
|
| | |
| | |
| | |
| | | |
(same name).
|
|\ \ \
| | | |
| | | | |
Fix testing guide typo
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Correct default value of `unknown_asset_fallback`
[ci skip]
|
|/ / /
| | |
| | |
| | |
| | | |
`Rails.application.config.assets.unknown_asset_fallback` now defaults to `false` in an unmodified Rails application.
[ci skip]
|
| | |
| | |
| | |
| | | |
Should be done before `before_add` callbacks.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
internal API [ci skip]
`:nodoc:` is specified, but unfortunately, it is exposed in the API doc.
http://edgeapi.rubyonrails.org/classes/Enumerable.html#method-i-_original_sum_with_required_identity
If the method of the `alias` destination is public, the specification of
`:nodoc:` does not seem to work.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since a record is already persisted in `after_create_commit`, so `save`
should invoke only `after_update_commit`.
This bug is caused by depending on `@_start_transaction_state` for
rollback to consider whether it was `new_record` before being committed.
If after commit callbacks caused another commit, the state before
last commit is no longer `new_record`.
Fixes #32831.
Closes #18367.
Closes #31106.
|
| | |
| | |
| | |
| | |
| | | |
Since #32289, `Spellchecker.suggest` returns only one value, multiple
suggestions not output.
|
|/ /
| |
| |
| | |
Fixes #32806.
|
|\ \
| |/
|/|
| |
| | |
ybakos/guides/layouts_and_rendering_class_spelling_fix
Capitalize class name 'Product' in layouts and rendering guide.
|
| |
| |
| |
| |
| | |
In this context, the phrase 'product instance' refers to the Product class,
so capitalize it.
|
|\ \
| | |
| | | |
ActiveStorage reflection
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Add the ability to reflect on the attachments that have been defined using ActiveRecord::Reflection.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
ybakos/guides/active_storage_overview_example_syntax_fix
Remove 'Current.' prefix from example.
|
| | |/
| |/|
| | |
| | |
| | | |
The prior sentence is referring just to an existing user object, so
the sudden magical 'Current.' prefix doesn't make sense. Remove it.
|
|\ \ \
| | | |
| | | | |
CI against MariaDB 10.3
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- MariaDB 10.3.7 is the first GA release
https://mariadb.com/kb/en/library/mariadb-1037-release-notes/
- MariaDB 10.3 translates `LENGTH()` to `OCTET_LENGTH()` function
https://mariadb.com/kb/en/library/sql_modeoracle-from-mariadb-103/
> MariaDB translates LENGTH() to OCTET_LENGTH()
- MySQL does NOT translate `LENGTH()` to `OCTET_LENGTH()`
However, it translates `OCTET_LENGTH()` to `LENGTH()`
Here are generated schema dumps of this test to show the differences
between MySQL and MariaDB:
* MySQL 8.0 (Server version: 8.0.11 MySQL Community Server - GPL)
```ruby
create_table \"virtual_columns\", options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\", force: :cascade do |t|
t.string \"name\"
t.virtual \"upper_name\", type: :string, as: \"upper(`name`)\"
t.virtual \"name_length\", type: :integer, as: \"length(`name`)\", stored: true
t.virtual \"name_octet_length\", type: :integer, as: \"length(`name`)\", stored: true
end
```
* Maria DB 10.3 (Server version: 10.3.7-MariaDB-1:10.3.7+maria~bionic-log mariadb.org binary distribution)
```ruby
create_table \"virtual_columns\", options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\", force: :cascade do |t|
t.string \"name\"
t.virtual \"upper_name\", type: :string, as: \"ucase(`name`)\"
t.virtual \"name_length\", type: :integer, as: \"octet_length(`name`)\", stored: true
t.virtual \"name_octet_length\", type: :integer, as: \"octet_length(`name`)\", stored: true
end
```
|
|\ \ \
| |_|/
|/| | |
[skip ci] Add changelog about bumping minimum SQLite version to 3.8
|
|/ /
| |
| |
| | |
Related to #32923
|
|\ \
| | |
| | | |
Remove mocha from action cable
|
| | |
| | |
| | |
| | | |
Q.E.D.
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
"brethen" is misspelled and could be clearer
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* ActionMailer::Base can unregister observer(s) and interceptor(s).
One or multiple mail observers can be unregistered using
`ActionMailer::Base.unregister_observers` or
`ActionMailer::Base.unregister_observer`.
One or multiple mail interceptors can be unregistered using
`ActionMailer::Base.unregister_interceptors` or
`ActionMailer::Base.unregister_interceptor`.
For preview interceptors, it's possible to use
`ActionMailer::Base.unregister_preview_interceptors` or
`ActionMailer::Base.unregister_preview_interceptor`.
* Ensure to be reset registered observer(s) and interceptor(s)
* Add explanation to CHANGELOG
* Add original author's name
[Kota Miyake + Rafael Mendonça França + Claudio Ortolina]
|
|\ \
| | |
| | | |
Align Time.zone.at method signature with that of Time::at
|
| |/
| |
| |
| | |
For parity with Ruby's Time::at
|
| | |
|
|\ \
| | |
| | | |
Include application/javascript when checking content_type
|
| | | |
|
| |/
|/|
| |
| | |
This is unnecessary since #22269.
|
|\ \
| | |
| | |
| | |
| | | |
Fix name of the second parameter of block executed by `discard_on` and `retry_on`
[ci skip]
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
`retry_on`
[ci skip]
Follow up #32854 and ba07b5fc12a740d41d288bea6347f15f4948483c.
|
|\ \
| | |
| | |
| | | |
Fix parent record should not get saved with duplicate children records
|
| | |
| | |
| | |
| | | |
- Fixes #32940
|
| | | |
|
| | | |
|