2023-09-27 03:59:11 +00:00
|
|
|
**DO NOT READ THIS FILE ON GITHUB, GUIDES ARE PUBLISHED ON https://guides.rubyonrails.org.**
|
|
|
|
|
|
|
|
Ruby on Rails 7.2 Release Notes
|
|
|
|
===============================
|
|
|
|
|
|
|
|
Highlights in Rails 7.2:
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2023-10-07 17:42:40 +00:00
|
|
|
Upgrading to Rails 7.2
|
2023-09-27 03:59:11 +00:00
|
|
|
----------------------
|
|
|
|
|
|
|
|
If you're upgrading an existing application, it's a great idea to have good test
|
|
|
|
coverage before going in. You should also first upgrade to Rails 7.1 in case you
|
|
|
|
haven't and make sure your application still runs as expected before attempting
|
|
|
|
an update to Rails 7.2. A list of things to watch out for when upgrading is
|
|
|
|
available in the
|
|
|
|
[Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-7-1-to-rails-7-2)
|
|
|
|
guide.
|
|
|
|
|
|
|
|
Major Features
|
|
|
|
--------------
|
|
|
|
|
|
|
|
Railties
|
|
|
|
--------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][railties] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
|
|
|
### Deprecations
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Action Cable
|
|
|
|
------------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][action-cable] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
|
|
|
### Deprecations
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Action Pack
|
|
|
|
-----------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][action-pack] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
2023-10-12 17:27:35 +00:00
|
|
|
* Remove deprecated constant `ActionDispatch::IllegalStateError`.
|
|
|
|
|
2023-10-12 17:32:26 +00:00
|
|
|
* Remove deprecated constant `AbstractController::Helpers::MissingHelperError`.
|
|
|
|
|
2023-10-12 17:43:54 +00:00
|
|
|
* Remove deprecated comparison between `ActionController::Parameters` and `Hash`.
|
|
|
|
|
2023-10-12 18:03:42 +00:00
|
|
|
* Remove deprecated `Rails.application.config.action_dispatch.return_only_request_media_type_on_content_type`.
|
|
|
|
|
2023-10-12 18:37:55 +00:00
|
|
|
* Remove deprecated `speaker`, `vibrate`, and `vr` permissions policy directives.
|
|
|
|
|
2023-10-12 18:42:40 +00:00
|
|
|
* Remove deprecated support to set `Rails.application.config.action_dispatch.show_exceptions` to `true` and `false`.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Deprecations
|
|
|
|
|
2023-10-12 17:43:54 +00:00
|
|
|
* Deprecate `Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality`.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Action View
|
|
|
|
-----------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][action-view] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
2024-01-03 13:40:52 +00:00
|
|
|
* Remove deprecated `@rails/ujs` in favor of `Turbo`.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Deprecations
|
|
|
|
|
2023-12-03 05:22:36 +00:00
|
|
|
* Deprecate passing content to void elements when using `tag.br` type tag builders.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Action Mailer
|
|
|
|
-------------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][action-mailer] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
2023-10-12 17:07:47 +00:00
|
|
|
* Remove deprecated `config.action_mailer.preview_path`.
|
|
|
|
|
2023-10-12 17:22:29 +00:00
|
|
|
* Remove deprecated params via `:args` for `assert_enqueued_email_with`.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Deprecations
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Active Record
|
|
|
|
-------------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][active-record] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
2023-10-12 19:29:53 +00:00
|
|
|
* Remove deprecated `Rails.application.config.active_record.suppress_multiple_database_warning`.
|
|
|
|
|
2023-10-12 21:26:28 +00:00
|
|
|
* Remove deprecated support to call `alias_attribute` with non-existent attribute names.
|
|
|
|
|
2023-10-12 21:45:21 +00:00
|
|
|
* Remove deprecated `name` argument from `ActiveRecord::Base.remove_connection`.
|
|
|
|
|
2023-10-12 21:49:54 +00:00
|
|
|
* Remove deprecated `ActiveRecord::Base.clear_active_connections!`.
|
|
|
|
|
|
|
|
* Remove deprecated `ActiveRecord::Base.clear_reloadable_connections!`.
|
|
|
|
|
|
|
|
* Remove deprecated `ActiveRecord::Base.clear_all_connections!`.
|
|
|
|
|
|
|
|
* Remove deprecated `ActiveRecord::Base.flush_idle_connections!`.
|
|
|
|
|
2023-10-12 21:57:15 +00:00
|
|
|
* Remove deprecated `ActiveRecord::ActiveJobRequiredError`.
|
|
|
|
|
2023-10-12 22:07:40 +00:00
|
|
|
* Remove deprecated support to define `explain` in the connection adapter with 2 arguments.
|
|
|
|
|
2023-10-13 14:08:21 +00:00
|
|
|
* Remove deprecated `ActiveRecord::LogSubscriber.runtime` method.
|
|
|
|
|
|
|
|
* Remove deprecated `ActiveRecord::LogSubscriber.runtime=` method.
|
|
|
|
|
|
|
|
* Remove deprecated `ActiveRecord::LogSubscriber.reset_runtime` method.
|
2023-10-12 21:49:54 +00:00
|
|
|
|
2023-10-13 14:35:44 +00:00
|
|
|
* Remove deprecated `ActiveRecord::Migration.check_pending` method.
|
|
|
|
|
2023-10-13 15:19:15 +00:00
|
|
|
* Remove deprecated support to passing `SchemaMigration` and `InternalMetadata` classes as arguments to
|
|
|
|
`ActiveRecord::MigrationContext`.
|
|
|
|
|
2023-10-13 15:29:28 +00:00
|
|
|
* Remove deprecated behavior to support referring to a singular association by its plural name.
|
|
|
|
|
2023-11-06 16:49:32 +00:00
|
|
|
* Remove deprecated `TestFixtures.fixture_path`.
|
|
|
|
|
2023-11-06 19:51:35 +00:00
|
|
|
* Remove deprecated support to `ActiveRecord::Base#read_attribute(:id)` to return the custom primary key value.
|
|
|
|
|
2023-11-06 19:58:33 +00:00
|
|
|
* Remove deprecated support to passing coder and class as second argument to `serialize`.
|
|
|
|
|
2023-11-06 20:23:40 +00:00
|
|
|
* Remove deprecated `#all_foreign_keys_valid?` from database adapters.
|
|
|
|
|
2023-11-06 21:09:58 +00:00
|
|
|
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache.load_from`.
|
|
|
|
|
2023-11-06 21:35:03 +00:00
|
|
|
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache#data_sources`.
|
|
|
|
|
2023-11-06 22:34:29 +00:00
|
|
|
* Remove deprecated `#all_connection_pools`.
|
|
|
|
|
2023-11-23 16:41:37 +00:00
|
|
|
* Remove deprecated support to apply `#connection_pool_list`, `#active_connections?`, `#clear_active_connections!`,
|
|
|
|
`#clear_reloadable_connections!`, `#clear_all_connections!` and `#flush_idle_connections!` to the connections pools
|
|
|
|
for the current role when the `role` argument isn't provided.
|
|
|
|
|
2023-11-23 16:57:23 +00:00
|
|
|
* Remove deprecated `ActiveRecord::ConnectionAdapters::ConnectionPool#connection_klass`.
|
|
|
|
|
2023-11-23 17:36:05 +00:00
|
|
|
* Remove deprecated `#quote_bound_value`.
|
|
|
|
|
2023-11-23 17:46:59 +00:00
|
|
|
* Remove deprecated support to quote `ActiveSupport::Duration`.
|
|
|
|
|
2023-11-28 16:19:51 +00:00
|
|
|
* Remove deprecated support to pass `deferrable: true` to `add_foreign_key`.
|
|
|
|
|
2023-11-28 16:59:45 +00:00
|
|
|
* Remove deprecated support to pass `rewhere` to `ActiveRecord::Relation#merge`.
|
|
|
|
|
2023-11-28 19:48:02 +00:00
|
|
|
* Remove deprecated behavior that would rollback a transaction block when exited using `return`, `break` or `throw`.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Deprecations
|
|
|
|
|
2023-10-13 15:29:28 +00:00
|
|
|
* Deprecate `Rails.application.config.active_record.allow_deprecated_singular_associations_name`
|
|
|
|
|
2023-11-28 19:48:02 +00:00
|
|
|
* Deprecate `Rails.application.config.active_record.commit_transaction_on_non_local_return`
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Active Storage
|
|
|
|
--------------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][active-storage] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
2024-01-08 21:46:28 +00:00
|
|
|
* Remove deprecated `config.active_storage.replace_on_assign_to_many`.
|
|
|
|
|
2024-01-08 21:53:50 +00:00
|
|
|
* Remove deprecated `config.active_storage.silence_invalid_content_types_warning`.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Deprecations
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Active Model
|
|
|
|
------------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][active-model] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
|
|
|
### Deprecations
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Active Support
|
|
|
|
--------------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][active-support] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
|
|
|
### Deprecations
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Active Job
|
|
|
|
----------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][active-job] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
2023-10-12 19:07:33 +00:00
|
|
|
* Remove deprecated primitive serializer for `BigDecimal` arguments.
|
|
|
|
|
2023-10-12 19:18:21 +00:00
|
|
|
* Remove deprecated support to set numeric values to `scheduled_at` attribute.
|
|
|
|
|
2023-10-12 19:26:25 +00:00
|
|
|
* Remove deprecated `:exponentially_longer` value for the `:wait` in `retry_on`.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Deprecations
|
|
|
|
|
2023-10-12 19:07:33 +00:00
|
|
|
* Deprecate `Rails.application.config.active_job.use_big_decimal_serialize`.
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Action Text
|
|
|
|
----------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][action-text] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
|
|
|
### Deprecations
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Action Mailbox
|
|
|
|
----------
|
|
|
|
|
2023-10-07 17:35:53 +00:00
|
|
|
Please refer to the [Changelog][action-mailbox] for detailed changes.
|
|
|
|
|
|
|
|
### Removals
|
|
|
|
|
|
|
|
### Deprecations
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
2023-09-27 03:59:11 +00:00
|
|
|
Ruby on Rails Guides
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
Please refer to the [Changelog][guides] for detailed changes.
|
|
|
|
|
|
|
|
### Notable changes
|
|
|
|
|
|
|
|
Credits
|
|
|
|
-------
|
|
|
|
|
|
|
|
See the
|
|
|
|
[full list of contributors to Rails](https://contributors.rubyonrails.org/)
|
|
|
|
for the many people who spent many hours making Rails, the stable and robust
|
|
|
|
framework it is. Kudos to all of them.
|
|
|
|
|
|
|
|
[railties]: https://github.com/rails/rails/blob/main/railties/CHANGELOG.md
|
|
|
|
[action-pack]: https://github.com/rails/rails/blob/main/actionpack/CHANGELOG.md
|
|
|
|
[action-view]: https://github.com/rails/rails/blob/main/actionview/CHANGELOG.md
|
|
|
|
[action-mailer]: https://github.com/rails/rails/blob/main/actionmailer/CHANGELOG.md
|
|
|
|
[action-cable]: https://github.com/rails/rails/blob/main/actioncable/CHANGELOG.md
|
|
|
|
[active-record]: https://github.com/rails/rails/blob/main/activerecord/CHANGELOG.md
|
|
|
|
[active-storage]: https://github.com/rails/rails/blob/main/activestorage/CHANGELOG.md
|
|
|
|
[active-model]: https://github.com/rails/rails/blob/main/activemodel/CHANGELOG.md
|
|
|
|
[active-support]: https://github.com/rails/rails/blob/main/activesupport/CHANGELOG.md
|
|
|
|
[active-job]: https://github.com/rails/rails/blob/main/activejob/CHANGELOG.md
|
|
|
|
[action-text]: https://github.com/rails/rails/blob/main/actiontext/CHANGELOG.md
|
|
|
|
[action-mailbox]: https://github.com/rails/rails/blob/main/actionmailbox/CHANGELOG.md
|
|
|
|
[guides]: https://github.com/rails/rails/blob/main/guides/CHANGELOG.md
|