Xavier Noria
4a4ed0fb0e
Pass transaction: nil in sql.active_record events if no transaction is open
2024-06-03 17:36:20 +02:00
Eileen M. Uchitelle
9cafa55ddd
Merge pull request #51339 from gjtorikian/enable-n_plus_one_only-toggling
...
Allow one to set `strict_loading_mode` globally
2024-06-03 06:12:04 -07:00
Andrey Sobolev
e1f00d2a93
Fix a typo in Active Record and PostgreSQL guide
2024-06-03 15:16:30 +03:00
Xavier Noria
f53d020c44
Copy-edit pass on the multiple databases guide
...
Main points:
* Applies our documentation guidelines (names of files, punctuation in comments, etc.)
* AnimalsRecord was introduced before the primary abstract class. Before this
point, stuff related to the primary database is explained first, and then you
go for the extra database. This is the natural order, I think. I reordered
for consistency.
* PrimaryApplicationRecord was missing connects_to.
* Fixes parent class for the example related to PrimaryApplicationRecord.
2024-06-03 14:05:03 +02:00
Garen J. Torikian
5ff9915db9
Allow one to set strict_loading_mode
globally
2024-06-02 14:38:38 -05:00
Matthew Draper
43fcdfa4d0
Revert "Remove deprecated support for the pre-Ruby 2.4 behavior of to_time
"
...
This reverts commit b1b2c6d59c3e82ff8eed95f5556a902a4c03abd9.
2024-06-02 23:52:59 +09:30
Rafael Mendonça França
67c7c913c6
Merge pull request #51976 from robin850/nitpicks-tuning-perf-guide
...
Tiny fixes to the "Tuning Performance" guide [ci skip]
2024-05-31 17:16:38 -04:00
Rafael Mendonça França
fd81dd6252
Merge pull request #51977 from wjohnstondrip/performance-documentation-tweak
...
Changed dimmed to deemed, in what I assume was a typo
2024-05-31 17:05:15 -04:00
Rafael Mendonça França
fe57bd2462
Lower case the link
header
...
Since 1fbcf54289
the early hints will be checked against Rack::Link that requires all
headers to be lower cased.
Fixes #51961 .
2024-05-31 21:00:22 +00:00
William Johnston
aa1ea1b871
Changed dimmed to deemed, in what I assume was a typo
2024-05-31 15:57:12 -05:00
Robin Dupret
78975c0267
Tiny fixes to the "Tuning Performance" guide [ci skip]
...
Following up #51924 .
2024-05-31 21:10:38 +02:00
Akhil G Krishnan
b7d8725cd6
Remove .devcontainer from default rails app directory guide
2024-05-31 23:04:03 +05:30
Xavier Noria
c16d552c32
Include the current transaction in sql.active_record event payloads
2024-05-31 13:05:20 +02:00
sampatbadhe
064c605dce
Add missing $ for a bash [ci skip]
2024-05-31 12:33:04 +05:30
Xavier Noria
9283b9ed08
Reorder items in transaction.active_record
docs
...
The `transaction.active_record` event is about transactions. Let's
first document the transaction object, then the transaction state,
and finally the connection in case you need more context.
2024-05-31 00:16:47 +02:00
Xavier Noria
ea0f0a2c96
Pass the transaction to the transaction.active_record event
2024-05-30 20:47:43 +02:00
Junichi Ito
f172824d77
[docs] Add note about params hash
...
Newbies tends to misunderstand params hash is a plain old Hash. So I
added a note that params hash is ActionController::Parameters.
2024-05-30 20:51:31 +09:00
Rafael Mendonça França
3aa026f691
Remove edgeguide host from the release notes
2024-05-29 23:16:56 +00:00
Louis-Michel Couture
f247a19dc7
Fix Tuning Performance for Deployment guide link [ci skip]
2024-05-29 14:56:40 -04:00
Petrik
11b25e0790
Fix query result of eager_load example in the guides. [ci-skip]
...
Calling `eager_load` will execute a single query with a join, not two.
The original queries were probably the result of executing the code in
the console, where `books = Book.eager_load(:author).limit(10) `
would execute the query.
2024-05-29 16:49:05 +02:00
Jean Boussier
23bf7b6807
Add a Rails Guide called "Tuning Performance for Deployment".
...
This guide explains major concurrency and performance principles
for Puma and CRuby.
This is a reworked version of #50949 .
Closes : #50949
Co-authored-by: Noah Gibbs <noah.gibbs@shopify.com>
2024-05-29 16:46:51 +02:00
Rafael Mendonça França
809409ab29
Merge pull request #51925 from zzak/re-51395-proxy_association
...
Make CollectionProxy#proxy_association public API
2024-05-28 13:39:28 -04:00
Mike Hickman
c6df8baf4b
Update spelling: Getting Start to Getting Started
2024-05-28 16:01:41 +01:00
zzak
7aa7e1e3e1
Make CollectionProxy#proxy_association public API
...
Co-authored-by: Petrik <petrik@deheus.net>
2024-05-28 07:47:43 +09:00
Rafael Mendonça França
f6918a5b5d
Merge pull request #51909 from rails/rm-release-notes
...
Draft of the release notes
2024-05-27 16:39:42 -04:00
Rafael Mendonça França
b0efe426e7
Edit pass on 7.2 release notes
2024-05-27 19:53:04 +00:00
Petrik de Heus
d0a3e18d4d
Merge pull request #51867 from duffuniverse/add-missed-comma-to-instrumentation-guide
...
[ci skip] Add a comma in the Exceptions section of Active Support Instrumentation guide
2024-05-25 23:29:21 +02:00
Xavier Noria
4cde578c0e
Restore original header for browser version guards
2024-05-25 19:27:30 +02:00
Xavier Noria
0a9d844c9a
Remove backticks from jemalloc
...
jemalloc is the name of a project.
2024-05-25 09:42:38 +02:00
Xavier Noria
91f9d640bd
Edit pass over the 7.2 release notes
2024-05-25 09:33:58 +02:00
Rafael Mendonça França
bb3da8726b
Draft of the release notes
2024-05-24 20:42:13 +00:00
Rafael Mendonça França
fe4617fd7e
Merge pull request #51912 from Earlopain/aj-priority
...
Document what higher/lower priority numbers mean in ActiveJob guide [ci skip]
2024-05-24 16:26:52 -04:00
Earlopain
2e8c0de787
Document what higher/lower priority numbers mean in ActiveJob guide
...
Or rather, what they could mean. What to do with priority numbers is up to the adapter implementation.
All adapters that support priority that I know of treat lower priority as more urgent:
* Backburner
* Delayed Job
* Que
* SolidQueue
* GoodJob (in v4)
2024-05-24 22:12:06 +02:00
Benjamín Silva
25b238568c
Fix association_basics.md
...
In this section the relation was renamed `:writer` so we need to reflect that in the examples.
2024-05-24 16:10:22 -04:00
Akhil G Krishnan
1c0fa2f542
Add Railties notable changes in 7.2 release note
2024-05-24 23:50:30 +05:30
Rafael Mendonça França
213bdfe470
Use the --devcontainer
option when generating a new Rails app in the guide
2024-05-23 21:12:16 +00:00
Carlos Antonio da Silva
be2ecdf26d
Merge pull request #51893 from indigotechtutorials/main
...
Fix the Direct Upload class example in Active Storage Docs [ci skip]
2024-05-23 17:14:09 -03:00
Rafael Mendonça França
b284f8b867
Merge pull request #51896 from rails/rm-make-invert-opt-in
...
Don't enable automatically_invert_plural_associations by default
2024-05-23 15:49:51 -04:00
Rafael Mendonça França
15381dd3b1
Merge pull request #51894 from rails/rm-enable-yjit
...
Move plumbing to enable yjit to inside the framework
2024-05-23 15:19:39 -04:00
Rafael Mendonça França
a8a848d76e
Don't enable automatically_invert_plural_associations by default
...
This can cause a lot of issues that are hard to detect.
It is better to make this opt-in for people that want to use it.
In Rails 8 we can revisit if we want to enable this config by default.
2024-05-23 19:15:01 +00:00
Rafael Mendonça França
30e6a197df
Move plumbing to enable yjit to inside the framework
...
There is no reason to expose all those details to users and this
has the benefit that now are can ensure that the YJIT is enabled
after all initialization is done.
2024-05-23 19:01:29 +00:00
Andrew Novoselac
a61bfe49a5
Make devcontainer opt-in when creating a new application
...
For Rails 7.2 we will make devcontainer and opt-in feature for new applications. When creating a new app, you can generate a devcontainer by passing the --devcontainer flag.
2024-05-23 18:43:19 +00:00
Indigo Tech
3855416df8
fix the direct upload class example
2024-05-23 11:54:46 -05:00
Cédric Carrard
992dbd791c
fix #50189 docs section reverting previous migrations mismatch code example
2024-05-22 21:09:42 +02:00
Ngan Pham
397585c22c
Document the transaction.active_record event
2024-05-21 16:43:42 -07:00
Andrey Sobolev
4da74fe880
Add a comma in exceptions section of instrumentation guide
2024-05-20 16:33:30 +03:00
Carlos Antonio da Silva
705b70a2f1
Merge pull request #51833 from akhilgkrishnan/remove-unnecessary-changes
...
Remove 7.2 release changes from Rails 8.0 release note [ci skip]
2024-05-16 10:21:59 -03:00
Carlos Antonio da Silva
49d4b1c311
Merge pull request #51834 from akhilgkrishnan/point-7-2-stable
...
Point 7-2-stable branch CHANGELOGS in rails 7-2 release note [ci skip]
2024-05-16 10:17:28 -03:00
Carlos Antonio da Silva
44b142452b
Merge pull request #51840 from p8/guides/i18n-repo
...
Update link to `i18n` gem repository [ci-skip]
2024-05-16 10:12:15 -03:00
eileencodes
ccd5a25e98
Clarify contributing doc to not ping maintainers
2024-05-16 09:10:58 -04:00
Joé Dupuis
478874ae1b
Add active_record.postgresql_adapter_decode_dates
...
to toggle automatic decoding of dates column with the
PostgresqlAdapter.
PR #51483 is a breaking change and should have been gated behind a
config.
2024-05-15 18:38:08 +00:00
Petrik
0f2487b579
Update link to i18n
gem repository [ci-skip]
...
The repository got moved to the `ruby-i18n` organization.
The google group no longer seems to be active and is removed as well.
2024-05-15 14:59:27 +02:00
Akhil G Krishnan
df15073efd
Point 7-2-stable branch CHANGELOGS in rails 7-2 release note
2024-05-15 09:20:28 +05:30
Akhil G Krishnan
84fa2f6d15
Remove 7.2 release changes from Rails 8.0 release note
2024-05-15 08:45:49 +05:30
Takuya Noguchi
b9b23111b4
Remove deprecated problem from local dev guide
...
mysql2 gem, as of mysql2 0.5.6, can now be compiled
with openssl@3 without any option on macOS. Also as
openssl@1.1 got EOL'd on 2023-09-11, we should not
recommend to use it.
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2024-05-14 14:35:18 +00:00
Rafael Mendonça França
a0e8ea1341
Add Highlights section in the Rails 7.1 release notes
2024-05-13 18:41:52 +00:00
Rafael Mendonça França
37fd0e7fe4
Development of Rails 8.0 starts now
...
🎉
2024-05-13 16:45:20 +00:00
Rafael Mendonça França
be0cb4e8f9
Remove debug require from guides generator
2024-05-10 18:42:55 +00:00
Rafael Mendonça França
0eed7c4ee4
Merge pull request #51637 from Shopify/update-docs-for-devcontainer
...
Update Getting Start With Rails guide to account for Dev Containers
2024-05-10 15:36:35 -03:00
Carlos Antonio da Silva
bc6b432d31
Merge pull request #51504 from MooseCowBear/navigation-highlight
...
Add navbar highlighting to guides when scrolling [ci skip]
2024-05-09 10:26:05 -03:00
Alex Ghiculescu
2194a738c7
Active Job: Correctly use the desired test adapter in tests
2024-05-09 17:35:50 +10:00
Nikita Vasilevsky
9cadf61835
Warn about changing query_constraints:
behavior
...
This commit adds a deprecation warning for the `query_constraints:`
association option. This option will change behavior in the future versions
of Rails and applications are encouraged to switch to `foreign_key:` to preserve the
current behavior.
2024-05-08 20:08:09 +00:00
Xavier Noria
dcbd6b0996
Revise the autoloading guide for middleware and friends
2024-05-07 06:25:02 -04:00
sunakan
8e7da61d51
Fix typo in configuring guide
2024-05-04 14:56:38 +09:00
Andrew Novoselac
2bcdfd2595
Update Getting Start With Rails guide to account for Dev Containers
...
Create a new guide called Getting Started with Dev Containers and link to it from the original Getting Started guide.
2024-05-03 08:53:20 -04:00
Akhil G Krishnan
03a07c16b6
Fix: guides styling issue on light mode
2024-05-03 15:35:44 +05:30
Akhil G Krishnan
3246b8cc0c
Update guides/source/getting_started.md
...
Co-authored-by: Justin Ko <jko170@gmail.com>
2024-05-02 20:11:50 +05:30
Akhil G Krishnan
ea66f754a6
Document .devcontainer to the file/folder structure of new application
2024-05-02 11:26:04 +05:30
Rafael Mendonça França
549144bff7
Merge pull request #51702 from akhilgkrishnan/fix-guides-broken-link
...
Add rake guides:lint task to raise error on broken anchor links
2024-05-01 19:24:33 -03:00
Rafael Mendonça França
b35df004fd
Remove deprecated Rails::Generators::Testing::Behaviour
2024-05-01 20:19:21 +00:00
Rafael Mendonça França
5085daf98e
Remove deprecated find_cmd_and_exec
console helper
2024-05-01 18:46:08 +00:00
Rafael Mendonça França
e38dfb2149
Remove deprecated Rails.config.enable_dependency_loading
2024-05-01 18:46:07 +00:00
Rafael Mendonça França
0c76f17f2d
Remove deprecated Rails.application.secrets
2024-05-01 18:46:04 +00:00
Rafael Mendonça França
c48aab17ce
Remove deprecated ActiveSupport::Notifications::Event#children
and ActiveSupport::Notifications::Event#parent_of?
2024-05-01 18:45:46 +00:00
Rafael Mendonça França
fc2dc7c8d3
Remove deprecated support to call the following methods without passing a deprecator
...
- `deprecate`
- `deprecate_constant`
- `ActiveSupport::Deprecation::DeprecatedObjectProxy.new`
- `ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new`
- `ActiveSupport::Deprecation::DeprecatedConstantProxy.new`
- `assert_deprecated`
- `assert_not_deprecated`
- `collect_deprecations`
2024-05-01 18:45:45 +00:00
Rafael Mendonça França
c682bf2641
Remove deprecated ActiveSupport::Deprecation
delegation to instance
2024-05-01 18:45:44 +00:00
Rafael Mendonça França
a45bfd9ee9
Remove deprecated SafeBuffer#clone_empty
2024-05-01 18:45:43 +00:00
Rafael Mendonça França
be211227a0
Remove deprecated #to_default_s
from Array
, Date
, DateTime
and Time
2024-05-01 18:45:41 +00:00
Rafael Mendonça França
c33e2d2e49
Remove deprecated support to passing Dalli::Client
instances to MemCacheStore
2024-05-01 18:45:40 +00:00
Rafael Mendonça França
21f38d3d40
Remove deprecated config.active_support.use_rfc4122_namespaced_uuids
2024-05-01 18:45:37 +00:00
Rafael Mendonça França
e73e67ee99
Remove deprecated config.active_support.remove_deprecated_time_with_zone_name
2024-05-01 18:44:53 +00:00
Rafael Mendonça França
0e6859a237
Remove deprecated config.active_support.disable_to_s_conversion
2024-05-01 18:44:52 +00:00
Rafael Mendonça França
c4fdfc55fa
Remove deprecated support to bolding log text with positional boolean in ActiveSupport::LogSubscriber#color
2024-05-01 18:44:51 +00:00
Rafael Mendonça França
75981ade29
Remove deprecated constants ActiveSupport::LogSubscriber::CLEAR
and ActiveSupport::LogSubscriber::BOLD
2024-05-01 18:44:50 +00:00
Rafael Mendonça França
38bfbcfbea
Remove deprecated support for config.active_support.cache_format_version = 6.1
2024-05-01 18:44:49 +00:00
Rafael Mendonça França
a3d6a9f5fc
Remove deprecated :pool_size
and :pool_timeout
options for the cache storage
2024-05-01 18:44:45 +00:00
Rafael Mendonça França
b1b2c6d59c
Remove deprecated support for the pre-Ruby 2.4 behavior of to_time
...
When `to_time_preserves_timezone` was set to `false`, `to_time`
would return a `Time` object with local timezone. This behavior
has been removed.
2024-05-01 18:44:31 +00:00
Rafael Mendonça França
0cf8444d61
Remove deprecated config.active_storage.silence_invalid_content_types_warning
2024-05-01 18:44:30 +00:00
Rafael Mendonça França
b06252e2a7
Remove deprecated config.active_storage.replace_on_assign_to_many
2024-05-01 18:44:29 +00:00
Akhil G Krishnan
61090b1f3f
Add rake guides:lint task to raise error on broken anchor links
...
Co-authored-by: zzak <zzakscott@gmail.com>
2024-05-01 17:29:35 +05:30
zzak
c8967521e5
Document buildkite/docs-preview pipeline
2024-05-01 08:05:36 +09:00
Rafael Mendonça França
894f0797ad
Merge pull request #51696 from kaylareopelle/fix-anchor-links-in-instrumentation-guide
...
[ci skip] Replace — with : in instrumentation subheadings
2024-04-30 18:50:41 -03:00
Rafael Mendonça França
6a6c7e64f5
Remove configuration to control what we do with tests without assertions
...
This is too much complexity for something low value. Let's just always
warn when a test doesn't have any assertions.
If people want to raise an error or ignore them, they can do so by
overriding `Warning.warn`.
2024-04-30 21:43:54 +00:00
Kayla Reopelle
d59d11903c
Replace — with : in instrumentation subheadings
...
When — is used in a subtitle, the anchor links use -%E2%80%94-
instead of —. This prevents the browser jumping to the anchor link.
Replacing — with : fixes the problem.
Co-authored-by: James Bunch <fallwith@gmail.com>
2024-04-30 14:27:06 -07:00
fatkodima
76966f9cb5
Allow assertionless tests to be reported
2024-04-26 18:24:16 +03:00
MooseCowBear
1e13e912bf
add navbar highlighting to guides
2024-04-25 12:14:14 -04:00
William Estoque
2fea8e723b
Add more gem docs in Rails Application Templates guide
...
Added doc on how to add a gem with a specific version. Added doc on how to add a comment.
2024-04-25 17:43:49 +08:00
zzak
7c7e4c5476
Fix building guides outside ./guides directory
...
As is the case with the `rake preview_docs` task.
```
Error reading assets/stylesrc/style.scss: Cannot open file.
Error reading assets/stylesrc/highlight.scss: Cannot open file.
Error reading assets/stylesrc/print.scss: Cannot open file.
```
2024-04-24 09:54:30 +09:00
André Guimarães Sakata
f6cace4f83
Use Ruby's official documentation
2024-04-23 17:57:56 -03:00
notapatch
66bc210568
Update guides: Replace filter with action callback
...
Rails 4.2 onwards replaced filter with action callback. However,
the term has remained in the rails guides and this PR fixes this.
Term used is "action callbacks" as this was used in the changelog:
> Deprecate all *_filter callbacks in favor of *_action callbacks.
[Original Change](489a8f2a44
)
Types of change:
- Filter(s) => Action callback(s)
- Generalized the word "Action callbacks" as it is longer.
- actions => "controller actions" to make "controller actions"
more distinct from "action callbacks".
2024-04-23 15:50:18 +01:00