Commit Graph

92140 Commits

Author SHA1 Message Date
Ryuta Kamizono
f74dc0d8aa
Merge pull request #52322 from fatkodima/fix-loaded-relation-batching
Fix loaded relation batching with limits and reverse order
2024-07-14 14:36:34 +09:00
Ryuta Kamizono
98f744a00d
Merge pull request #52324 from nisusam/fix_test_typo
Fix typo from tests [ci skip]
2024-07-14 12:58:59 +09:00
Petrik de Heus
4835c94d8a
Merge pull request #51940 from p8/guides/fix-eager-load-examples
Fix query result of eager_load example in the guides. [ci-skip]
2024-07-13 21:23:34 +02:00
Hartley McGuire
02621b9b3a
Merge pull request #52319 from yamashun/correct-markdown-collapsed-in-rails-guides
Fix markdown table collapse in configuring.md [ci skip]
2024-07-13 18:13:08 +00:00
nisusam
bb33c5c902 Fix typo from tests [ci skip] 2024-07-13 23:35:09 +05:30
Xavier Noria
6903ac45e8 Polish the new deprecate_constant API docs 2024-07-13 18:59:23 +02:00
Xavier Noria
9f9dafbe53
Merge pull request #52323 from rails/fxn/deprecate_constant
Improvements to deprecate_constant
2024-07-13 18:54:48 +02:00
Xavier Noria
cb0acdae88 Improvements to deprecate_constant 2024-07-13 18:43:29 +02:00
Xavier Noria
e1f8909c66
Merge pull request #52321 from rails/fxn/rm-ActiveRecord-ImmutableRelation
Delete the deprecated constant ActiveRecord::ImmutableRelation
2024-07-13 13:28:24 +02:00
Xavier Noria
32c5a358bb Delete the deprecated constant ActiveRecord::ImmutableRelation 2024-07-13 12:51:40 +02:00
fatkodima
d21f95940c Fix loaded relation batching with limits and reverse order 2024-07-13 13:42:52 +03:00
Xavier Noria
5b0e7a31bb
Merge pull request #52320 from rails/fxn/constant-deprecation
Deprecate ActiveRecord::ImmutableRelation
2024-07-13 12:41:21 +02:00
Xavier Noria
1e2c260284 Deprecate ActiveRecord::ImmutableRelation 2024-07-13 12:27:21 +02:00
yamashun
56072cc1ff Fix markdown table collapse in configuring.md 2024-07-13 18:26:32 +09:00
John Hawthorn
4867559a10
Merge pull request #52084 from jhawthorn/time_with_zone_always_time
Remove dead code for DateTime-backed TimeWithZone
2024-07-11 14:59:00 -07:00
Gannon McGibbon
36b2dbfc1d
Merge pull request #52271 from Schwad/schwad/only_watch_local_translations
[i18n] - Do not watch translations from gems when reloading is enabled
2024-07-11 13:00:20 -05:00
John Hawthorn
725ebc9e10 Remove code for DateTime-backed TimeWithZone
At one point (I believe until ruby-1.8.0) Time could only represent
values between 1970 and the integer overflow in 2038. On modern Ruby
there does not seem to be a limit.

    >> Time.at(2**128)
    => 10783118943836478994022445751222-08-06 01:04:16 -0700

TimeWithZone will also convert a DateTime to a Time when initialized
with one, so the code we had to catch this overflow and to deal with
DateTime is dead. This commit removes this code and adjusts the test to
be more general (the old test passed but we might as well keep a better
version of the test to check that we have a large both negative and
positive range).

Co-authored-by: Adam Hess <HParker@github.com>
2024-07-11 10:34:51 -07:00
Yasuo Honda
86d3ea1089
Merge pull request #52306 from fatkodima/fix-flaky-instrumentation-test
Fix a flaky Active Record instrumentation test
2024-07-11 21:33:03 +09:00
Jean Boussier
e98f4d8496
Merge pull request #52305 from joshuay03/fix-52304
[Fix #52304] Avoid computing `klass` if reflection is a `belongs_to` in `ActiveRecord::AutosaveAssociation#inverse_belongs_to_association_for`
2024-07-11 10:49:36 +02:00
fatkodima
182988b41f Fix a flaky Active Record instrumentation test 2024-07-11 11:35:27 +03:00
Joshua Young
38c1d5a70b [Fix #52304] Avoid computing klass if reflection is a belongs_to in ActiveRecord::AutosaveAssociation#inverse_belongs_to_association_for 2024-07-11 13:09:07 +05:30
Nick Schwaderer
e617046124 Do not watch translations from gems when reloading is enabled
Co-authored-by: Gannon McGibbon <gannon@hey.com>

I18n is intialized with file watchers for all translation paths when
reloading is enabled.

This includes translations contained within gems; which the user will
not be editing in development. This adds unnecessary performance
overhead.

This change ensures we're only watching the files we care about.

```ruby
[
  "/Users/schwad/.gem/ruby/3.3.3/gems/validate_url-1.0.15/lib/locale/ar.yml", #
  ...
  "/Users/schwad/path/to/my/app/config/locales/foo/en.yml"
  ...
]

```
[
  "/Users/schwad/path/to/my/app/config/locales/foo/en.yml"
  ...
]
```
2024-07-11 08:16:21 +01:00
Hartley McGuire
69d904e60f
Merge pull request #49854 from skipkayhil/hm-document-aj-logger
Document ActiveJob::Base#logger and #log_arguments
2024-07-11 03:36:53 +00:00
Hartley McGuire
ac916c643a
Document ActiveJob::Base#logger and #log_arguments 2024-07-10 23:14:42 -04:00
Hartley McGuire
8950070e55
Merge pull request #50063 from skipkayhil/hm-doc-metal
Add documentation for delegated methods on Metal
2024-07-11 01:58:43 +00:00
Hartley McGuire
eb60e20193
Add documentation for delegated methods on Metal
Some of these were specifically mentioned earlier in the Metal docs
(response_body=, content_type=, status=) but were not linked because the
methods were not documented (due to being part of a delegation).

This commit separates all of the delegated methods so that they can be
documented, adds links for the mentioned methods, and additionally
documents two methods on Response that are mentioned in the new Metal
documentation, but were not previously documented.
2024-07-10 21:41:34 -04:00
Eileen M. Uchitelle
99fd4c0c90
Merge pull request #52276 from andycroll/guides-h2-code-css
Guides CSS to format code tags in h2 headings [ci skip]
2024-07-10 10:43:26 -04:00
Yasuo Honda
ef087627f5
Merge pull request #52293 from akhilgkrishnan/upgrade-ruby-variant-devcontainer
Upgrade devcontainer to use ruby 3.3.4
2024-07-10 07:56:33 +09:00
Akhil G Krishnan
aa10d79bce Upgrade devcontainer to use ruby 3.3.4 2024-07-09 10:25:16 +05:30
Jean Boussier
16f1222753
Merge pull request #49847 from joshuay03/duplicate-callbacks-when-child-autosaves-parent
[Fix #48688] Duplicate callback execution when child autosaves parent with `has_one` and `belongs_to`
2024-07-08 19:00:47 +02:00
Jean Boussier
78ce2994b2
Merge pull request #51948 from justinko/issue-51938
Restore inferred association class with the same modularized name
2024-07-08 17:53:03 +02:00
Jean Boussier
9e597ea3f7
Merge pull request #52289 from Shopify/fix-strict-freshness
Check `If-None-Match` before `If-Modified-Since` with strict freshness
2024-07-08 17:37:25 +02:00
Jenny Shen
bdd9f4e89e Check If-None-Match before If-Modified-Since with strict freshness 2024-07-08 11:23:00 -04:00
Yasuo Honda
9f178ada79
Merge pull request #52282 from wonda-tea-coffee/delete-obsolete-version-in-compose-yaml
Delete obsolete version in compose.yaml
2024-07-08 08:55:20 +09:00
Joshua Young
154f4a4ba9 [Fix 48688] Duplicate callback execution when child autosaves parent with has_one and belongs_to 2024-07-07 11:03:45 +05:30
Jean Boussier
cacf96ecd0
Merge pull request #52283 from natematykiewicz/nate/immutable_cache_forever
Make http_cache_forever use `immutable: true`
2024-07-06 20:08:48 +02:00
Jean Boussier
ccdd52427a
Merge pull request #52232 from djfpaagman/activejob-lazy-query-source
Improve performance of ActiveJob::LogSubscriber#query_source_location
2024-07-06 20:08:23 +02:00
Dennis Paagman
912440d8b7 Improve performance of ActiveJob::LogSubscriber#enqueue_source_location
In line with the improvements made in #49095, implements the same
lazily yielding backtrace frame. This will improve the performance of
`verbose_enqueue_logs`.
2024-07-06 20:07:21 +02:00
Nate Matykiewicz
78ad54569b
Make http_cache_forever use immutable: true 2024-07-06 01:59:39 -05:00
wonda-tea-coffee
fb69560bea Delete obsolete version in compose.yaml
The following warning appeared when starting devcontainer.

```
WARN[0000] /home/***/ghq/github.com/rails/rails/.devcontainer/compose.yaml: `version` is obsolete
WARN[0000] /tmp/devcontainercli-***/docker-compose/docker-compose.devcontainer.build-1720224621191.yml: `version` is obsolete
```

In fact, the top-level version element will be obsolete in the compose specification.
https://github.com/compose-spec/compose-spec/blob/master/spec.md#version-top-level-element-obsolete
2024-07-06 09:29:11 +09:00
Andy Croll
6fc58b8eea
Guides CSS to format code tags in h2 headings
Noticed when reading the edge guides that we have some wonky formatting for the case when we use a method name in an h2 heading.

There's already a fix for h3-level headings, so I copied the font-weight (400) and eyeballed a font-size. 2.25rem looked too much to my eyes, so went with 2rem.
2024-07-05 12:12:12 +01:00
Jean Boussier
0d30e84878 Fix a typo 2024-07-05 11:52:59 +02:00
Petrik de Heus
a9a93368a6
Merge pull request #52275 from kabirpathak/update-doc-for-number-helper-in-active-support
[ci skip] Added usage documentation for ActiveSupport::NumberHelper.
2024-07-05 11:34:08 +02:00
Jean Boussier
126445239f
Merge pull request #52274 from Shopify/http-cache
Prefer ETag over Last-Modified for `fresh_when` and `stale?` according to the HTTP specification
2024-07-05 10:27:46 +02:00
kabirpathak
126cab3af7 [ci skip] Added usage documentation for ActiveSupport::NumberHelper. 2024-07-05 13:51:55 +05:30
heka1024
fc7637103a Prefer ETag over Last-Modified for fresh_when and stale? according to the HTTP specification 2024-07-05 10:18:43 +02:00
Jean Boussier
c79671cc5c
Merge pull request #52254 from ddux/patch-1
[ci skip] Update config/boot.rb contents in initialization.md
2024-07-05 10:00:54 +02:00
Jean Boussier
2edad3c542
Merge pull request #52272 from fatkodima/skip-triggering-instantiation-notification
Skip triggering "instantiation.active_record" notification when there are no records
2024-07-05 09:59:55 +02:00
fatkodima
2410312733 Skip triggering "instantiation.active_record" notification when there are no records 2024-07-04 21:43:46 +03:00
eileencodes
4fa56814f1
fix newlines
New lines for these were off, only the new options were put on a new
line so the code looked awkward. I'd rather just oneline it.
2024-07-03 08:41:48 -04:00