Skip to content

Upgrading actionmailer 7 to 8

Breaking7.2.4 → 8.1.4Breaking97Security19Platform1Deprecated30New310Changed208Fixed398Other87

BreakingUpgrade verdict

77 breaking changes and a platform requirement change and 19 security fixes.

  • A long-deprecated way of calling Time#since with a Time object no longer works.
  • Benchmark.ms was removed from Active Support; use the benchmark gem instead.
  • Adding a Time to an ActiveSupport::TimeWithZone is no longer supported.
  • to_time no longer has an option to use the system local time; it always keeps the receiver's timezone.
Top 5 of 121 that need code or config changes

Ruby requirement changed in 8.0.0.beta1: >= 3.1.0 → >= 3.2.0.

Breaking77
Removes deprecated support for passing a Time object to Time#since.
Time#since
Removes the deprecated Benchmark.ms method, now defined in the benchmark gem.
Benchmark.ms
Removes deprecated addition of Time instances with ActiveSupport::TimeWithZone.
TimeActiveSupport::TimeWithZone
Removes deprecated support for to_time preserving the system local time; it now always preserves the receiver timezone.
to_time
Removes deprecated :unsigned_float and :unsigned_decimal column methods for MySQL.
:unsigned_float:unsigned_decimal
Removes the deprecated :retries option for the SQLite3 adapter.
:retries
Removes deprecated support to route to multiple paths.
Removes deprecated support for using semicolons as a query string separator.
ActionDispatch::QueryParser.each_pair
Removes deprecated support for skipping over leading brackets in parameter names in the parameter parser.
ActionDispatch::ParamBuilder.from_query_string
Removes support for setting ActiveJob::Base.enqueue_after_transaction_commit to :never, :always and :default.
ActiveJob::Base.enqueue_after_transaction_commit
Removes the deprecated Rails.application.config.active_job.enqueue_after_transaction_commit config.
Rails.application.config.active_job.enqueue_after_transaction_commit
Removes the deprecated :azure storage service.
:azure
Removes deprecated STATS_DIRECTORIES.
STATS_DIRECTORIES
Removes the deprecated bin/rake stats command.
bin/rake stats
Removes the deprecated rails/console/methods.rb file.
rails/console/methods.rb
Rails no longer generates a bin/bundle binstub when creating new applications, since the mechanism is now part of Rubygem itself.
bin/bundle
Remove deprecated passing a Time object to Time#since.
Time#since
Remove deprecated Benchmark.ms method.
Benchmark.msbenchmark
Remove deprecated addition for Time instances with ActiveSupport::TimeWithZone.
TimeActiveSupport::TimeWithZone
Remove deprecated support for to_time to preserve the system local time.
to_time
remote_ip will no longer ignore IPs in X-Forwarded-For headers if they are accompanied by port information.
remote_ip
Remove deprecated STATS_DIRECTORIES.
STATS_DIRECTORIES
Remove deprecated bin/rake stats command.
Remove deprecated rails/console/methods.rb file.
rails/console/methods.rb
Remove deprecated :unsigned_float and :unsigned_decimal column methods for MySQL.
:unsigned_float:unsigned_decimal
Remove deprecated :retries option for the SQLite3 adapter.
:retries
Model generator no longer needs a database connection to validate column types.
PoolConfig no longer keeps a reference to the connection class.
Remove autocomplete="off" on hidden inputs generated by form_tag, token_tag, method_tag, and the hidden parameter fields included in button_to forms will omit the autocomplete="off" attribute.
autocomplete="off"form_tagtoken_tagmethod_tagbutton_to
Remove deprecated support to a route to multiple paths.
Remove deprecated support for using semicolons as a query string separator.
Remove deprecated support to skipping over leading brackets in parameter names in the parameter parser.
Remove support to set ActiveJob::Base.enqueue_after_transaction_commit to :never, :always and :default.
ActiveJob::Base.enqueue_after_transaction_commit:never:always:default
Remove deprecated Rails.application.config.active_job.enqueue_after_transaction_commit.
Rails.application.config.active_job.enqueue_after_transaction_commit
Remove deprecated :azure storage service.
:azure
Remove unnecessary calls to the GCP metadata server.
A Blob will no longer autosave associated Attachment.
Remove unnecessary ruby-version input from ruby/setup-ruby.
ruby-versionruby/setup-ruby
Rails no longer generates a bin/bundle binstub when creating new applications.
bin/bundle
Removes deprecated support for passing an array of strings to ActiveSupport::Deprecation#warn.
ActiveSupport::Deprecation#warnActiveSupport::ProxyObject
Removes deprecated support for setting attr_internal_naming_format with a @ prefix.
attr_internal_naming_format
Removes deprecated ActiveSupport::ProxyObject.
ActiveSupport::ProxyObject
Removes deprecated support for setting ENV["SCHEMA_CACHE"].
ENV["SCHEMA_CACHE"]
Removes deprecated support for passing a database name to cache_dump_filename.
cache_dump_filename
Removes deprecated ActiveRecord::ConnectionAdapters::ConnectionPool#connection.
ActiveRecord::ConnectionAdapters::ConnectionPool#connection
Removes deprecated config.active_record.warn_on_records_fetched_greater_than.
config.active_record.warn_on_records_fetched_greater_than
Removes deprecated support for defining enum with keyword arguments.
enum
Removes deprecated support for finding database adapters not registered to Active Record.
Removes deprecated config.active_record.allow_deprecated_singular_associations_name.
config.active_record.allow_deprecated_singular_associations_name
Removes deprecated config.active_record.commit_transaction_on_non_local_return.
config.active_record.commit_transaction_on_non_local_return
Removes deprecated support for passing content to void tag elements on the tag builder.
tag
Removes deprecated support for passing nil to the model: argument of form_with.
form_withnilmodel:
Removes Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality.
Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality
Removes deprecated config.active_job.use_big_decimal_serializer.
config.active_job.use_big_decimal_serializer
Removes deprecated support for extending the Rails console through Rails::ConsoleMethods.
Rails::ConsoleMethods
Removes the deprecated rails/console/helpers file.
rails/console/helpersrails/console/app
Removes deprecated config.active_record.sqlite3_deprecated_warning.
config.active_record.sqlite3_deprecated_warning
Deletes the deprecated constant ActiveRecord::ImmutableRelation.
ActiveRecord::ImmutableRelation
Removes the deprecated config.read_encrypted_secrets setting.
config.read_encrypted_secrets
The db:prepare task no longer loads seeds when a non-primary database is created.
db:prepareseedstruefalse
Remove deprecated config.active_record.sqlite3_deprecated_warning.
config.active_record.sqlite3_deprecated_warning
Remove deprecated config.read_encrypted_secrets.
config.read_encrypted_secrets
Drop MySQL 5.5 support.
Delete the deprecated constant ActiveRecord::ImmutableRelation.
ActiveRecord::ImmutableRelation
Rename text_area methods into textarea.
text_areatextarearich_text_arearich_textarea
Rename check_box* methods into checkbox*.
check_box*checkbox*
Remove racc dependency by manually writing ActionDispatch::Journey::Scanner.
raccActionDispatch::Journey::Scanner
Remove require_* statements from application.css to align with the transition from Sprockets to Propshaft.
require_*application.cssrequire_treerequire_self
Use Solid Cable as the default Action Cable adapter in production, configured as a separate queue database in config/database.yml.
Solid Cableconfig/database.yml
Makes :class_name invalid in polymorphic belongs_to associations.
belongs_toclass_name
Raises AbstractController::DoubleRenderError when head is called after rendering.
AbstractController::DoubleRenderErrorhead
A route pointing to a non-existing controller now returns a 500 instead of a 404.
Removes the deprecated internal SuckerPunch adapter in favor of the adapter included with the sucker_punch gem.
SuckerPunch
Skip calling PG::Connection#cancel in cancel_any_running_query when using libpq >= 18 with pg < 1.6.0, due to incompatibility.
PG::Connection#cancelcancel_any_running_query
Remove deprecated internal SuckerPunch adapter in favor of the adapter included with the sucker_punch gem.
SuckerPunchsucker_punch
Prevents glob injection in DiskService#delete_prefixed by escaping glob metacharacters, breaking code that relied on glob expansion.
DiskService#delete_prefixedDir.glob
Fixes HashWithIndifferentAccess#stringify_keys to stringify all keys, not just symbols.
ActiveSupport::HashWithIndifferentAccess#stringify_keys
Security19
Limits the size of strings ActiveModel::Type::Integer coerces with to_i to prevent a DoS vector.
ActiveModel::Type::Integerto_i
Filters the database password out of failed db: task command error messages.
Rejects malformed hosts with extra ports in ActionDispatch::HostAuthorization.
ActionDispatch::HostAuthorization
Fixes possible XSS in DebugExceptions middleware.
DebugExceptions
Attributes filtered by filter_attributes are now also filtered by filter_parameters to avoid leaking sensitive information.
filter_attributesfilter_parameters
Rate limits password resets in the authentication generator to mitigate abuse from attackers spamming the password reset form.
Disables libvips unfuzzed image loaders and savers via Vips.block_untrusted(true) at boot, raising Vips::Error for affected transformations.
Vips.block_untrusted(true)Vips::Errorconfig.active_storage.variable_content_types:mini_magick
Rejects scientific notation in NumberConverter.
NumberConverter
Fixes SafeBuffer#% to preserve unsafe status.
SafeBuffer#%
Improves performance of NumberToDelimitedConverter.
NumberToDelimitedConverter
Skips blank attribute names in tag helpers to avoid generating invalid HTML.
Filters user supplied metadata in DirectUploadController.
DirectUploadController
Adds a configurable maximum streaming chunk size, defaulting to 100mb for blob byte ranges.
Limits range requests to a single range.
Prevents path traversal in DiskService; path_for raises InvalidKeyError for dot segments or paths outside the storage root.
DiskServiceDiskService#path_forInvalidKeyErrorDiskController
Calls inspect on ids in RecordNotFound errors, addressing CVE-2025-55193.
RecordNotFound
Removes dangerous transformations, addressing CVE-2025-24293.
Adds validation to content security policies to disallow spaces and semicolons.
Sets Regexp.timeout to 1 second by default to mitigate Regexp denial-of-service attacks.
Regexp.timeout
Platform1
Requires libvips 8.13 or newer and ruby-vips 2.2.1 or newer when ruby-vips is installed, raising RuntimeError at boot otherwise.
libvipsruby-vipsRuntimeError
Deprecated24
Deprecates config.active_support.to_time_preserves_timezone.
config.active_support.to_time_preserves_timezone
Deprecates String#mb_chars and ActiveSupport::Multibyte::Chars.
String#mb_charsActiveSupport::Multibyte::Chars
Deprecates ActiveSupport::Configurable.
ActiveSupport::Configurable
Deprecates using insert_all/upsert_all with unpersisted records in associations, which are lost after the operation.
insert_allupsert_all
Deprecates using update_all with WITH, WITH RECURSIVE or DISTINCT, which were ignored; an error will be raised in a future release.
update_alldelete_all
Deprecates Rails.application.config.action_dispatch.ignore_leading_brackets.
Rails.application.config.action_dispatch.ignore_leading_brackets
Deprecates the built-in sidekiq adapter; use the adapter from the sidekiq gem 7.3.3 or later.
sidekiq
Deprecate config.active_support.to_time_preserves_timezone.
config.active_support.to_time_preserves_timezone
Deprecate String#mb_chars and ActiveSupport::Multibyte::Chars.
String#mb_charsActiveSupport::Multibyte::Chars
Deprecate ActiveSupport::Configurable.
ActiveSupport::Configurable
Deprecate using insert_all/upsert_all with unpersisted records in associations.
insert_allupsert_all
Deprecate usage of unsupported methods in conjunction with update_all.
update_allWITHDISTINCTdelete_all
Deprecate Rails.application.config.action_dispatch.ignore_leading_brackets.
Rails.application.config.action_dispatch.ignore_leading_brackets
Deprecate built-in sidekiq adapter.
sidekiq
Deprecates the Benchmark.ms core extension as the benchmark gem becomes bundled in Ruby 3.5.
Benchmark.msbenchmark
Deprecates addition and since between two Time or ActiveSupport::TimeWithZone instances, to be removed in Rails 8.1.
TimeActiveSupport::TimeWithZonesince10.days.ago.since(10.days.ago)
Deprecates unsigned_float and unsigned_decimal short-hand column methods.
unsigned_floatunsigned_decimal
Deprecates drawing routes with multiple paths to make routing faster.
getwith_options
Deprecates sucker_punch as an adapter option.
sucker_punchadapter: async
Deprecates bin/rake stats in favor of bin/rails stats.
bin/rake statsbin/rails stats
Deprecates ActiveStorage::Service::AzureStorageService.
ActiveStorage::Service::AzureStorageService
Deprecates the ::STATS_DIRECTORIES constant in favor of Rails::CodeStatistics.register_directory.
::STATS_DIRECTORIESRails::CodeStatistics.register_directory
Deprecate ActiveStorage::Service::AzureStorageService.
ActiveStorage::Service::AzureStorageService
Deprecate ::STATS_DIRECTORIES.
::STATS_DIRECTORIESSTATS_DIRECTORIESRails::CodeStatistics.register_directoryRails::CodeStatistics.register_directory(label, path)