Petrik de Heus
d35f52c5d1
Merge pull request #52315 from maniSHarma7575/52310-update-doc-for-active-record-basic-guide
...
[DOC] Update active record basic guide for create method
2024-07-17 08:12:06 +02:00
Eileen M. Uchitelle
e6ca80ee0d
Merge pull request #52298 from hharen/hh-mtw/no-connection-pool
...
Raise specific exception when a connection is not defined
2024-07-16 16:57:00 -04:00
Hana Harencarova
0bdf44d921
Raise specific exception when a connection is not defined
...
Co-authored-by: Matthew Draper <matthewd@github.com>
2024-07-16 19:53:46 +00:00
David Heinemeier Hansson
7b1ceb7659
Add basic sessions generator ( #52328 )
...
* Add basic sessions generator
* Excess CR
* Use required fields
* Add sessions generator test
* Fix generated migration
* Test migration content
* Appease rubocop
* Add CHANGELOG
2024-07-16 18:05:53 +02:00
David Heinemeier Hansson
3ce3a4e94c
Remove channels from default app/ structure ( #52344 )
...
* Remove channels from default app/ structure
Now that Hotwire is the default, the majority of apps won't need custom
channels. And those that do can get the files back via the generator.
* Remove trailing space
* Remove additional needless elements
* No longer to be generated
* No longer generated
2024-07-16 16:55:00 +02:00
Hartley McGuire
f805b35c1b
Merge pull request #52239 from skipkayhil/hm-fix-markup-in-template
...
Fix markup directive in Action Cable templates
2024-07-16 13:00:51 +00:00
David Heinemeier Hansson
f973075aa4
Drop default permissions policy initializer ( #52341 )
...
It is too rarely used to warrant such a prominent placement in the
default structure.
2024-07-16 14:41:16 +02:00
David Heinemeier Hansson
2f92b1c94e
Add not-null modifier to migrations ( #52327 )
...
* Add migration type modifier for not-null attributes
* Explain change
* Appease rubocop by using AS helper
* Deal with nil
2024-07-16 14:37:42 +02:00
Akshay Birajdar
26575aa19c
Support rfc2822 format for Time#to_fs & Date#to_fs ( #52337 )
2024-07-16 12:34:20 +02:00
Jerome Dalbert
c01a846658
Add script folder and generator ( #52335 )
...
Add a new script default folder to hold one-off or general purpose
scripts, such as data migration scripts, cleanup scripts, etc. Also add
a script generator to create such scripts.
Co-authored-by: Haroon Ahmed <haroon.ahmed25@gmail.com>
2024-07-16 12:28:20 +02:00
David Heinemeier Hansson
44548856c4
Not worth the active support require line
2024-07-16 12:15:06 +02:00
David Heinemeier Hansson
009f767ca7
No longer used
2024-07-16 12:11:55 +02:00
Gannon McGibbon
099776069c
Merge pull request #52303 from Shopify/routing_source_locations_in_command
...
Only enable routing source locations when using routes command
2024-07-15 11:39:39 -05:00
maniSHarma7575
453577f640
[DOC] Update Active Record basic guide for create method in case of validation fails
2024-07-15 17:35:37 +05:30
Jean Boussier
56fbc632a3
Merge pull request #52333 from joshuay03/fix-52332
...
[Fix #52332 ] Handle record changed case in `#save_has_one_association`'s inverse `belongs_to` association updated check
2024-07-15 09:39:34 +02:00
Joshua Young
9920ad3ef4
[ Fix #52332 ] Handle record changed case in #save_has_one_association
's inverse belongs_to
association updated check
2024-07-15 09:17:44 +05:30
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
Gannon McGibbon
e3cc8fe707
Only enable routing source locations when using routes command
...
The overhead isn't necessary for development when not using the routes
command. We can omit it entirely by checking for existence of the routes
command constant.
2024-07-11 18:53:20 -05: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