Upgrading rails 5 to 6
Breaking5.2.8.1 → 6.1.7.10Breaking121Security37Platform10Deprecated67New286Changed211Fixed288Other1
BreakingUpgrade verdict
120 breaking changes and a platform requirement change and 37 security fixes.
In plain terms
- Removes deprecated ActiveSupport::Notifications::Instrumenter#end=.
- Removes deprecated ActiveSupport::Multibyte::Unicode methods pack_graphemes, unpack_graphemes, normalize, downcase, upcase and swapcase.
- Removes deprecated ActiveSupport::Multibyte::Chars#consumes? and ActiveSupport::Multibyte::Chars#normalize.
- Removes deprecated file active_support/core_ext/range/include_range.
Must act Top 5 of 225 that need code or config changes
rails publishes an official migration guide for version 6. It covers more than the release notes do.
Upgrading from Rails 5.2 to Rails 6.0 ↗Ruby requirement changed in 6.0.0.beta1: >= 2.2.2 → >= 2.5.0.
What you must change
Breaking120
Removes deprecated ActiveSupport::Notifications::Instrumenter#end=.
ActiveSupport::Notifications::Instrumenter#end=Removes deprecated ActiveSupport::Multibyte::Unicode methods pack_graphemes, unpack_graphemes, normalize, downcase, upcase and swapcase.
ActiveSupport::Multibyte::Unicode.pack_graphemesActiveSupport::Multibyte::Unicode.unpack_graphemesActiveSupport::Multibyte::Unicode.normalizeActiveSupport::Multibyte::Unicode.downcaseActiveSupport::Multibyte::Unicode.upcaseActiveSupport::Multibyte::Unicode.swapcaseRemoves deprecated ActiveSupport::Multibyte::Chars#consumes? and ActiveSupport::Multibyte::Chars#normalize.
ActiveSupport::Multibyte::Chars#consumes?ActiveSupport::Multibyte::Chars#normalizeRemoves deprecated file active_support/core_ext/range/include_range.
active_support/core_ext/range/include_rangeRemoves deprecated file active_support/core_ext/hash/transform_values.
active_support/core_ext/hash/transform_valuesRemoves deprecated file active_support/core_ext/hash/compact.
active_support/core_ext/hash/compactRemoves deprecated file active_support/core_ext/array/prepend_and_append.
active_support/core_ext/array/prepend_and_appendRemoves deprecated file active_support/core_ext/numeric/inquiry.
active_support/core_ext/numeric/inquiryRemoves deprecated file active_support/core_ext/module/reachable.
active_support/core_ext/module/reachableRemoves deprecated Module#parent_name, Module#parent and Module#parents.
Module#parent_nameModule#parentModule#parentsRemoves deprecated ActiveSupport::LoggerThreadSafeLevel#after_initialize.
ActiveSupport::LoggerThreadSafeLevel#after_initializeRemoves deprecated LoggerSilence constant.
LoggerSilenceRemoves deprecated fallback to I18n.default_local when config.i18n.fallbacks is empty.
I18n.default_localconfig.i18n.fallbacksRemoves deprecated methods from ActiveRecord::ConnectionAdapters::DatabaseLimits.
ActiveRecord::ConnectionAdapters::DatabaseLimitscolumn_name_lengthtable_name_lengthcolumns_per_tableindexes_per_tablecolumns_per_multicolumn_indexsql_query_lengthjoins_per_queryRemoves deprecated ActiveRecord::ConnectionAdapters::AbstractAdapter#supports_multi_insert?.
ActiveRecord::ConnectionAdapters::AbstractAdapter#supports_multi_insert?Removes deprecated ActiveRecord::ConnectionAdapters::AbstractAdapter#supports_foreign_keys_in_create?.
ActiveRecord::ConnectionAdapters::AbstractAdapter#supports_foreign_keys_in_create?Removes deprecated ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#supports_ranges?.
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#supports_ranges?Removes deprecated ActiveRecord::Base#update_attributes and ActiveRecord::Base#update_attributes!.
ActiveRecord::Base#update_attributesActiveRecord::Base#update_attributes!Removes the deprecated migrations_path argument from ActiveRecord::ConnectionAdapter::SchemaStatements#assume_migrated_upto_version.
ActiveRecord::ConnectionAdapter::SchemaStatements#assume_migrated_upto_versionmigrations_pathRemoves deprecated config.active_record.sqlite3.represent_boolean_as_integer.
config.active_record.sqlite3.represent_boolean_as_integerrelation.create no longer leaks scope to class level querying methods in initialization blocks and callbacks.
relation.createNamed scope chains no longer leak scope to class level querying methods.
scopeRemoves deprecated methods from ActiveRecord::DatabaseConfigurations.
ActiveRecord::DatabaseConfigurationsfetcheachfirstvalues[]=Removes the deprecated ActiveRecord::Result#to_hash method.
ActiveRecord::Result#to_hashRemoves deprecated support for using unsafe raw SQL in ActiveRecord::Relation methods.
ActiveRecord::RelationRemoves ibm_db, informix, mssql, oracle, and oracle12 Arel visitors which are not used in the code base.
ibm_dbinformixmssqloracleoracle12Removes :connection_id from the sql.active_record notification.
:connection_idsql.active_recordThe :name key is no longer returned in DatabaseConfig#configuration_hash; use DatabaseConfig#owner_name instead.
:nameDatabaseConfig#configuration_hashDatabaseConfig#owner_nameChanges
form_with to generate non-remote forms by default.form_withconfig.action_view.form_with_generates_remote_formsRemoves deprecated
escape_whitelist from ActionView::Template::Handlers::ERB.escape_whitelistActionView::Template::Handlers::ERBRemoves deprecated
find_all_anywhere from ActionView::Resolver.find_all_anywhereActionView::ResolverRemoves deprecated
formats from ActionView::Template::HTML.ActionView::Template::HTMLformatsRemoves deprecated
formats from ActionView::Template::RawFile.ActionView::Template::RawFileformatsRemoves deprecated
formats from ActionView::Template::Text.ActionView::Template::TextformatsRemoves deprecated
find_file from ActionView::PathSet.ActionView::PathSetfind_fileRemoves deprecated
rendered_format from ActionView::LookupContext.ActionView::LookupContextrendered_formatRemoves deprecated
find_file from ActionView::ViewPaths.ActionView::ViewPathsfind_fileRemoves deprecated support for passing a non-
ActionView::LookupContext object as the first argument to ActionView::Base#initialize.ActionView::Base#initializeActionView::LookupContextRemoves deprecated
format argument from ActionView::Base#initialize.ActionView::Base#initializeformatRemoves deprecated
ActionView::Template#refresh.ActionView::Template#refreshRemoves deprecated
ActionView::Template#original_encoding.ActionView::Template#original_encodingRemoves deprecated
ActionView::Template#variants.ActionView::Template#variantsRemoves deprecated
ActionView::Template#formats.ActionView::Template#formatsRemoves deprecated
ActionView::Template#virtual_path=.ActionView::Template#virtual_path=Removes deprecated
ActionView::Template#updated_at.ActionView::Template#updated_atRemoves the deprecated
updated_at argument required on ActionView::Template#initialize.ActionView::Template#initializeupdated_atRemoves deprecated
ActionView::Template.finalize_compiled_template_methods.ActionView::Template.finalize_compiled_template_methodsRemoves deprecated
config.action_view.finalize_compiled_template_methods.config.action_view.finalize_compiled_template_methodsRemoves deprecated support for calling
ActionView::ViewPaths#with_fallback with a block.ActionView::ViewPaths#with_fallbackRemoves deprecated support for passing absolute paths to
render template:.render template:Removes deprecated support for passing relative paths to
render file:.render file:Removes support for template handlers that do not accept two arguments.
Removes the deprecated pattern argument in
ActionView::Template::PathResolver.ActionView::Template::PathResolverRemoves deprecated support for calling private methods from objects in some view helpers.
Removes deprecated ActionDispatch::Http::ParameterFilter.
ActionDispatch::Http::ParameterFilterRemoves deprecated force_ssl at the controller level.
force_sslRemoves deprecated ActionMailer::Base.receive in favor of Action Mailbox.
ActionMailer::Base.receiveRemoves deprecated support for passing :combine_options operations to ActiveStorage::Transformers::ImageProcessing.
ActiveStorage::Transformers::ImageProcessing:combine_optionsRemoves the deprecated ActiveStorage::Transformers::MiniMagickTransformer.
ActiveStorage::Transformers::MiniMagickTransformerRemoves the deprecated config.active_storage.queue setting.
config.active_storage.queueRemoves the deprecated ActiveStorage::Downloading module.
ActiveStorage::DownloadingReplaces Blob.create_after_upload! with Blob.create_and_upload! and removes the former.
Blob.create_after_upload!Blob.create_and_upload!Removes deprecated
rake dev:cache tasks.rake dev:cacheRemoves deprecated
rake routes tasks.rake routesRemoves deprecated
rake initializers tasks.rake initializersRemoves deprecated support for the
HOST environment variable to specify the server IP.HOSTRemoves the deprecated
server argument from the rails server command.rails serverRemoves deprecated
SOURCE_ANNOTATION_DIRECTORIES environment variable support from rails notes.SOURCE_ANNOTATION_DIRECTORIESrails notesRemoves the deprecated
connection option from the rails dbconsole command.rails dbconsoleRemoves deprecated
rake notes tasks.rake notesRemoves access to values in nested hashes returned by
Rails.application.config_for via String keys.Rails.application.config_forChanges form_with to generate non-remote forms by default.
form_withconfig.action_view.form_with_generates_remote_formsEnvironment config files can now modify autoload_paths, autoload_once_paths, and eager_load_paths, so autoloading within those files no longer works.
autoload_pathsautoload_once_pathseager_load_pathsconfig.to_prepareRemoves the deprecated Module#reachable? method.
Module#reachable?Removes the deprecated #acronym_regex method from Inflections.
Inflections#acronym_regexRenames Module#parent, #parents and #parent_name to module_parent, module_parents and module_parent_name.
Module#parentModule#parentsModule#parent_nameModule#module_parentModule#module_parentsModule#module_parent_nameRemoves deprecated
#set_state from the transaction object.#set_stateRemoves deprecated
#supports_statement_cache? from the database adapters.#supports_statement_cache?Removes deprecated
#insert_fixtures from the database adapters.#insert_fixturesRemoves deprecated
ActiveRecord::ConnectionAdapters::SQLite3Adapter#valid_alter_table_type?.ActiveRecord::ConnectionAdapters::SQLite3Adapter#valid_alter_table_type?Removes delegation of missing methods in a relation to arel.
Removes delegation of missing methods in a relation to private methods of the class.
Removes the ability to specify a timestamp name for
#cache_key.#cache_keyRemoves deprecated
ActiveRecord::Migrator.migrations_path=.ActiveRecord::Migrator.migrations_path=Removes deprecated
expand_hash_conditions_for_aggregates.expand_hash_conditions_for_aggregatesRemoves the deprecated
image_alt helper.image_altRemoves
ActionView::Helpers::RecordTagHelper.ActionView::Helpers::RecordTagHelperRemoves the deprecated
fragment_cache_key helper in favor of combined_fragment_cache_key.fragment_cache_keycombined_fragment_cache_keyRemoves deprecated
ActionDispatch::TestResponse methods #success?, missing? and error?.ActionDispatch::TestResponse#success?#missing?#error?#successful?#not_found?#server_error?Remove support for the Qu gem, which has been incompatible since Rails 5.1 and is no longer maintained.
Removes the deprecated after_bundle helper inside plugin templates.
after_bundleRemoves deprecated support for old config.ru files that pass the application class as an argument to run.
config.rurunRemoves the deprecated environment argument from the rails commands.
environmentRemoves the deprecated capify! method.
capify!Removes the deprecated config.secret_token setting.
config.secret_tokenActiveSupport::Callbacks#halted_callback_hook now receives the halted callback name as a second argument.
ActiveSupport::Callbacks#halted_callback_hookActiveSupport::Duration.build now raises TypeError unless value is Numeric.
ActiveSupport::Duration.buildActiveSupport::DurationEncapsulates each validation error as an Error object, changing the errors collection from a messages/details hash.
ActiveModel::Errorerrorsmessagefull_messagedetailserrors#to_hashwhere.not now generates NAND predicates instead of NOR.
where.notconnects_to can now only be called on ActiveRecord::Base or abstract classes.
connects_toActiveRecord::BaseAll connection adapters' execute now raises ActiveRecord::ConnectionNotEstablished instead of ActiveRecord::StatementInvalid on connection errors.
executeActiveRecord::ConnectionNotEstablishedActiveRecord::StatementInvalidMysql2Adapter#quote_string now raises ActiveRecord::ConnectionNotEstablished instead of ActiveRecord::StatementInvalid when it cannot connect.
Mysql2Adapter#quote_stringActiveRecord::ConnectionNotEstablishedActiveRecord::StatementInvalidCalling
connected_to on subclasses of ActiveRecord::Base is now disallowed.ActiveRecord::Baseconnected_toFreezes the database configurations hash to disallow mutations; use the DatabaseConfig object directly instead.
ActiveRecord::Base.configurationsDatabaseConfigActiveRecord::DatabaseConfigurations::HashConfigconfiguration_hashRequires
ActionView::Base subclasses to implement #compiled_method_container.ActionView::Basecompiled_method_containerMakes the
locals argument required on ActionView::Template#initialize.ActionView::Template#initializelocalsChanges ActionDispatch::Response#content_type to return the full Content-Type header.
ActionDispatch::Response#content_typefixture_file_upload now uses paths relative to file_fixture_path instead of fixture_path.
fixture_file_uploadfile_fixture_pathfixture_pathStops running after_enqueue and after_perform callbacks when the callback chain is halted, opt-in until Rails 6.2.
after_enqueueafter_performbefore_enqueueconfig.active_job.skip_after_callbacks_if_terminatedActiveSupport::Callbacks#halted_callback_hook now receives the halted callback name as a second argument.
ActiveSupport::Callbacks#halted_callback_hookActiveSupport::Duration.build now raises TypeError unless value is Numeric, instead of building durations from Strings.
ActiveSupport::Duration.buildActiveSupport::DurationActiveSupport::Duration::ScalarEncapsulates each validation error as an ActiveModel::Error object, changing the errors collection from a messages/details hash.
ActiveModel::Errorerrors#firsterrors#slice!errors#eacherrors#valueserrors#keyserrors#to_xmlerrors#to_hRails raises ActiveRecord::ReadOnlyError if any connection on the reading handler attempts a write.
ActiveRecord::ReadOnlyErrorEnsures :reading connections always raise ActiveRecord::ReadOnlyError if a write is attempted.
ActiveRecord::ReadOnlyError:readingDoes not allow passing the column name to
sum when a block is passed.sumcountMoves
ActiveRecord::StatementInvalid SQL to an error property and includes binds as a separate error property.ActiveRecord::StatementInvalidActiveRecord::ConnectionAdapters::AbstractAdapter#translate_exception_classActiveRecord::ConnectionAdapters::AbstractAdapter#translate_exceptionDefining an enum as a Hash with a blank key or an Array with a blank value now raises an
ArgumentError.ArgumentErrorEnum raises an
ArgumentError on invalid definition values; only a Hash, array of Symbols or array of Strings are allowed.ArgumentErrorChanges ActiveRecord::Base.configurations to return an object instead of a hash, with hash-like methods deprecated and a new configs_for method.
ActiveRecord::Base.configurationsActiveRecord::DatabaseConfigurationsconfigs_forActionCable JavaScript package is converted to ES2015 with breaking changes to adapter configuration and debugging methods.
ActionCable.adapters.WebSocketActionCable.adapters.loggerActionCable.startDebugging()ActionCable.stopDebugging()ActionCable.logger.enabledSecurity37
Avoids regex backtracking in HTTP Token authentication in Action Pack.
Avoids regex backtracking in query parameter filtering in Action Pack.
Avoids regex backtracking in the
block_format helper in Action Mailer.block_formatAvoids regex backtracking in plain_text_for_blockquote_node in Action Text.
plain_text_for_blockquote_nodeIncludes the HTTP Permissions-Policy header on non-HTML Content-Types.
Uses a temporary file for storing unencrypted files while editing, addressing CVE-2023-38037.
Raises an exception if illegal characters are provided to redirect_to.
redirect_toImplements SafeBuffer#bytesplice to address CVE-2023-28120.
SafeBuffer#bytespliceIgnores certain data-* attributes in rails-ujs when the element is contenteditable, addressing CVE-2023-23913.
rails-ujsAvoids regex backtracking in Inflector.underscore.
Inflector.underscoreAdds an integer width check to PostgreSQL::Quoting, configurable via ActiveRecord::Base.raise_int_wider_than_64bit which defaults to true.
PostgreSQL::QuotingActiveRecord::Base.raise_int_wider_than_64bitAvoids regex backtracking on the If-None-Match header.
If-None-MatchUses string#split instead of regex for domain parts.
String#splitPrevents open redirects by correctly escaping the host allow list.
Makes
sanitize_as_sql_comment more strict to prevent sanitization bypass with crafted input (CVE-2023-22794).sanitize_as_sql_commentannotateChanges ActiveRecord::Coders::YAMLColumn default to safe_load, addressing CVE-2022-32224.
ActiveRecord::Coders::YAMLColumnconfig.active_storage.use_yaml_unsafe_loadconfig.active_record.yaml_column_permitted_classesFixes and adds XSS protections in ActionView::Helpers and ERB::Util, adding ERB::Util.xml_name_escape to escape dangerous characters in tag and attribute names per the XML spec.
ActionView::HelpersERB::UtilERB::Util.xml_name_escapeFixes and adds XSS protections in Action View tag helpers by escaping dangerous characters in tag and attribute names per XML, and renames the :escape_attributes option to :escape.
:escape_attributes:escapeAdds configurable allow-list validation for Active Storage image transformation methods, alongside the existing deny-list for arguments.
VariantFixes a case where middleware is not told the response body is fully closed, so request state is not fully reset before the next request.
Fixes X_FORWARDED_HOST protection in Action Pack.
X_FORWARDED_HOSTPrevents catastrophic backtracking during mime parsing.
Prevents regex denial of service in HTTP token authentication.
Prevents string polymorphic route arguments in url_for to avoid unwanted route helper calls.
url_forFixes a possible DoS vector in the PostgreSQL money type by correcting the regexp used to validate money format.
Prevents an open redirect when the allowed host starts with a dot.
Prevents XSS in Actionable Exceptions (CVE-2020-8264).
Only allows ActionableErrors when show_detailed_exceptions is enabled, addressing CVE-2020-8185.
ActionableErrorsshow_detailed_exceptionsDeprecates Marshal.load on raw cache reads in RedisCacheStore due to CVE-2020-8165.
RedisCacheStoreMarshal.loadAvoids Marshal.load on raw cache values in MemCacheStore due to CVE-2020-8165.
MemCacheStoreMarshal.loadChecks that requests are same-origin before including the CSRF token in XHRs due to CVE-2020-8167.
HMACs the raw CSRF token before masking it so it cannot reconstruct a per-form token, per CVE-2020-8166.
Returns self from #each, #each_pair, and #each_value instead of the raw @parameters hash, per CVE-2020-8164.
#each#each_pair#each_value@parametersIncludes Content-Length in the signature for ActiveStorage direct uploads due to CVE-2020-8162.
ActiveStorageFixes a possible XSS vector in the escape_javascript helper (CVE-2020-5267).
escape_javascriptFixes a possible information leak and session hijacking vulnerability, tracked as CVE-2019-16782.
ActionDispatch::Session::MemcacheStoreIntroduces
ActionDispatch::HostAuthorization middleware to guard against DNS rebinding and Host header attacks.ActionDispatch::HostAuthorizationRails.application.config.hostsPlatform1
Rails 6 requires Ruby 2.5.0 or newer.
Deprecations to plan for
Deprecated67
Deprecates ActiveSupport::Multibyte::Unicode.default_normalization_form.
ActiveSupport::Multibyte::Unicode.default_normalization_formDeprecates config.active_support.use_sha1_digests in favour of config.active_support.hash_digest_class = ::Digest::SHA1.
config.active_support.use_sha1_digestsconfig.active_support.hash_digest_class::Digest::SHA1Deprecates URI.parser, to be removed in Rails 6.2; use URI::DEFAULT_PARSER instead.
URI.parserURI::DEFAULT_PARSERDocuments require_dependency as obsolete in :zeitwerk mode and encourages not using it.
require_dependencyDeprecates using Range#include? to check inclusion in a date time range; recommends Range#cover? instead.
Range#include?Range#cover?Deprecates marshalling load from the legacy attributes format.
Deprecates ActiveRecord::Base.allow_unsafe_raw_sql.
ActiveRecord::Base.allow_unsafe_raw_sqlDeprecates rails db:structure:{load, dump} tasks and extends db:schema:{load, dump} to handle :ruby or :sql formats.
rails db:structure:loadrails db:structure:dumprails db:schema:loadrails db:schema:dumpconfig.active_record.schema_formatDeprecates YAML loading from legacy format older than Rails 5.0.
Deprecates map! and collect! on ActiveRecord::Result.
ActiveRecord::Resultmap!collect!Deprecates passing an Active Record object to quote/type_cast directly.
quotetype_castDeprecates aggregations with group by duplicated fields; use uniq!(:group) to deduplicate group fields.
uniq!(:group)Deprecates duplicated query annotations; use uniq!(:annotate) to deduplicate query annotations.
uniq!(:annotate)Deprecates passing a column to type_cast.
type_castDeprecates in_clause_length and allowed_index_name_length in DatabaseLimits.
in_clause_lengthallowed_index_name_lengthDatabaseLimitsDeprecates using return, break or throw to exit a transaction block after writes.
returnbreakthrowDeprecates
spec_name in favor of name on database configurations.spec_namenameconfigs_forDatabaseConfigDeprecates #remove_connection on the handler in favor of #remove_connection_pool; #remove_connection will be removed in 6.2.
#remove_connection#remove_connection_poolDatabaseConfigDeprecates #default_hash and its alias #[] on database configurations; use configs_for instead, removal in 6.2.
#default_hash#[]configs_forDeprecates "primary" as the connection_specification_name for ActiveRecord::Base in favor of "ActiveRecord::Base".
ActiveRecord::Baseconnection_specification_nameActiveRecord::Base.connection_handler.retrieve_connectionActiveRecord::Base.connection_handler.remove_connectionDeprecates connection_config in favor of connection_db_config, which returns a DatabaseConfig instead of a Hash.
connection_configconnection_db_configDatabaseConfigurations::DatabaseConfigDeprecates the database kwarg without replacement; use connects_to for new connections.
databaseconnects_toDeprecates DatabaseConfigurations#to_h; connection hashes remain available via ActiveRecord::Base.configurations.configs_for.
DatabaseConfigurations#to_hActiveRecord::Base.configurations.configs_forAdds DatabaseConfig#configuration_hash with symbol keys and deprecates DatabaseConfig#config.
DatabaseConfig#configuration_hashDatabaseConfig#configDeprecates .reorder(nil) with .first / .first! taking non-deterministic results; use .take / .take! instead.
reorderfirstfirst!taketake!Deprecates
config.action_view.raise_on_missing_translations in favor of config.i18n.raise_on_missing_translations.config.action_view.raise_on_missing_translationsconfig.i18n.raise_on_missing_translationsDeprecates config.action_dispatch.return_only_media_type_on_content_type.
config.action_dispatch.return_only_media_type_on_content_typeDeprecates config.active_job.return_false_on_aborted_enqueue.
config.active_job.return_false_on_aborted_enqueueDeprecates Variant#service_url and Preview#service_url in favour of #url.
Variant#service_urlPreview#service_url#urlDeprecates action_mailbox api_key and MAILGUN_INGRESS_API_KEY in favor of signing_key and MAILGUN_INGRESS_SIGNING_KEY.
Rails.application.credentials.action_mailbox.api_keyMAILGUN_INGRESS_API_KEYRails.application.credentials.action_mailbox.signing_keyMAILGUN_INGRESS_SIGNING_KEYThe classic autoloader starts its deprecation cycle; new projects should use zeitwerk and existing ones should switch.
classiczeitwerkDeprecates
Rails::DBConsole#config without replacement; use Rails::DBConsole.db_config.configuration_hash instead.Rails::DBConsole#configRails::DBConsole.db_config.configuration_hashDocuments require_dependency as obsolete in :zeitwerk mode and encourages not using it.
require_dependencyDeprecates
spec_name in favor of name on database configurations, including accessors on configs_for and DatabaseConfig.spec_namenameconfigs_forDatabaseConfigDeprecates
#remove_connection in favor of #remove_connection_pool when called on the handler; removal planned for 6.2.#remove_connection#remove_connection_poolDatabaseConfigDeprecates
#default_hash and its alias #[] on database configurations; use configs_for instead, removal planned for 6.2.#default_hash#[]configs_forDeprecates .reorder(nil) with .first / .first! taking a non-deterministic result; use .take / .take! instead.
reorderfirstfirst!taketake!Deprecates Variant#service_url and Preview#service_url in favour of #url.
Variant#service_urlPreview#service_url#urlBlobStarts the deprecation cycle for the
classic autoloader, recommending zeitwerk mode instead.classiczeitwerkDeprecates
Rails::DBConsole#config without replacement, pointing to Rails::DBConsole.db_config.configuration_hash.Rails::DBConsole#configRails::DBConsole.db_config.configuration_hashSoft deprecates the database kwarg in connected_to by removing its documentation.
connected_toCorrectly deprecates where.not working as NOR for relations.
where.notDeprecates Unicode#pack_graphemes and Unicode#unpack_graphemes in favor of native String methods.
ActiveSupport::Multibyte::Unicode#pack_graphemesActiveSupport::Multibyte::Unicode#unpack_graphemesDeprecates ActiveSupport::Multibyte::Chars.consumes? in favor of String#is_utf8?.
ActiveSupport::Multibyte::Chars.consumes?String#is_utf8?Deprecates Unicode#normalize and Chars#normalize in favor of String#unicode_normalize.
ActiveSupport::Multibyte::Unicode#normalizeActiveSupport::Multibyte::Chars#normalizeString#unicode_normalizeDeprecates Unicode#downcase, #upcase and #swapcase in favor of the String equivalents.
ActiveSupport::Multibyte::Unicode#downcaseActiveSupport::Multibyte::Unicode#upcaseActiveSupport::Multibyte::Unicode#swapcaseString#downcaseString#upcaseString#swapcaseDeprecates the use of LoggerSilence in favor of ActiveSupport::LoggerSilence.
LoggerSilenceActiveSupport::LoggerSilenceDeprecates using negative limits in String#first and String#last.
String#firstString#lastDeprecates
config.activerecord.sqlite3.represent_boolean_as_integer.config.activerecord.sqlite3.represent_boolean_as_integerDeprecates passing
migrations_paths to connection.assume_migrated_upto_version.migrations_pathsconnection.assume_migrated_upto_versionDeprecates
ActiveRecord::Result#to_hash in favor of ActiveRecord::Result#to_a.ActiveRecord::Result#to_hashActiveRecord::Result#to_aDeprecates DatabaseLimits methods column_name_length, table_name_length, columns_per_table, indexes_per_table, columns_per_multicolumn_index, sql_query_length and joins_per_query.
DatabaseLimits.column_name_lengthDatabaseLimits.table_name_lengthDatabaseLimits.columns_per_tableDatabaseLimits.indexes_per_tableDatabaseLimits.columns_per_multicolumn_indexDatabaseLimits.sql_query_lengthDatabaseLimits.joins_per_queryDeprecates
update_attributes/update_attributes! in favor of update/update!.update_attributesupdate_attributes!updateupdate!Deprecates calling private model methods from view helpers such as
options_from_collection_for_select and collection_select.options_from_collection_for_selectcollection_selectDeprecates
ActionDispatch::Http::ParameterFilter in favor of ActiveSupport::ParameterFilter.ActionDispatch::Http::ParameterFilterActiveSupport::ParameterFilterDeprecates controller level force_ssl in favor of config.force_ssl.
force_sslconfig.force_sslDeprecate
ActionMailer::Base.receive in favor of Action Mailbox.ActionMailer::Base.receiveAdd
MailDeliveryJob for regular and parameterized mail, deprecating DeliveryJob and Parameterized::DeliveryJob.MailDeliveryJobDeliveryJobParameterized::DeliveryJobReplaces config.active_storage.queue with config.active_storage.queues.analysis and config.active_storage.queues.purge; the old option is deprecated.
config.active_storage.queueconfig.active_storage.queues.analysisconfig.active_storage.queues.purgeDeprecates
rake routes in favor of rails routes.rake routesrails routesDeprecates
rake initializers in favor of rails initializers.rake initializersrails initializersDeprecates
rake dev:cache in favor of rails dev:cache.rake dev:cacherails dev:cacheDeprecates
rails notes subcommands in favor of passing an annotations argument to rails notes.rails notesrails notes:customrails notes:optimizerails notes:todorails notes:fixme--annotations-aDeprecates the
SOURCE_ANNOTATION_DIRECTORIES environment variable in favor of config.annotations.register_directories.SOURCE_ANNOTATION_DIRECTORIESRails::SourceAnnotationExtractor::Annotationconfig.annotations.register_directoriesDeprecates
rake notes in favor of rails notes.rake notesrails notesDeprecates using the
HOST environment variable to specify the server IP in favor of BINDING.HOSTBINDINGDeprecates passing the Rack server name as a regular argument to
rails server in favor of the --using/-u option.rails server--using-u