Skip to content

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.

  • 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.
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.

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.swapcase
Removes deprecated ActiveSupport::Multibyte::Chars#consumes? and ActiveSupport::Multibyte::Chars#normalize.
ActiveSupport::Multibyte::Chars#consumes?ActiveSupport::Multibyte::Chars#normalize
Removes deprecated file active_support/core_ext/range/include_range.
active_support/core_ext/range/include_range
Removes deprecated file active_support/core_ext/hash/transform_values.
active_support/core_ext/hash/transform_values
Removes deprecated file active_support/core_ext/hash/compact.
active_support/core_ext/hash/compact
Removes deprecated file active_support/core_ext/array/prepend_and_append.
active_support/core_ext/array/prepend_and_append
Removes deprecated file active_support/core_ext/numeric/inquiry.
active_support/core_ext/numeric/inquiry
Removes deprecated file active_support/core_ext/module/reachable.
active_support/core_ext/module/reachable
Removes deprecated Module#parent_name, Module#parent and Module#parents.
Module#parent_nameModule#parentModule#parents
Removes deprecated ActiveSupport::LoggerThreadSafeLevel#after_initialize.
ActiveSupport::LoggerThreadSafeLevel#after_initialize
Removes deprecated LoggerSilence constant.
LoggerSilence
Removes deprecated fallback to I18n.default_local when config.i18n.fallbacks is empty.
I18n.default_localconfig.i18n.fallbacks
Removes deprecated methods from ActiveRecord::ConnectionAdapters::DatabaseLimits.
ActiveRecord::ConnectionAdapters::DatabaseLimitscolumn_name_lengthtable_name_lengthcolumns_per_tableindexes_per_tablecolumns_per_multicolumn_indexsql_query_lengthjoins_per_query
Removes 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_path
Removes deprecated config.active_record.sqlite3.represent_boolean_as_integer.
config.active_record.sqlite3.represent_boolean_as_integer
relation.create no longer leaks scope to class level querying methods in initialization blocks and callbacks.
relation.create
Named scope chains no longer leak scope to class level querying methods.
scope
Removes deprecated methods from ActiveRecord::DatabaseConfigurations.
ActiveRecord::DatabaseConfigurationsfetcheachfirstvalues[]=
Removes the deprecated ActiveRecord::Result#to_hash method.
ActiveRecord::Result#to_hash
Removes deprecated support for using unsafe raw SQL in ActiveRecord::Relation methods.
ActiveRecord::Relation
Removes ibm_db, informix, mssql, oracle, and oracle12 Arel visitors which are not used in the code base.
ibm_dbinformixmssqloracleoracle12
Removes :connection_id from the sql.active_record notification.
:connection_idsql.active_record
The :name key is no longer returned in DatabaseConfig#configuration_hash; use DatabaseConfig#owner_name instead.
:nameDatabaseConfig#configuration_hashDatabaseConfig#owner_name
Changes form_with to generate non-remote forms by default.
form_withconfig.action_view.form_with_generates_remote_forms
Removes deprecated escape_whitelist from ActionView::Template::Handlers::ERB.
escape_whitelistActionView::Template::Handlers::ERB
Removes deprecated find_all_anywhere from ActionView::Resolver.
find_all_anywhereActionView::Resolver
Removes deprecated formats from ActionView::Template::HTML.
ActionView::Template::HTMLformats
Removes deprecated formats from ActionView::Template::RawFile.
ActionView::Template::RawFileformats
Removes deprecated formats from ActionView::Template::Text.
ActionView::Template::Textformats
Removes deprecated find_file from ActionView::PathSet.
ActionView::PathSetfind_file
Removes deprecated rendered_format from ActionView::LookupContext.
ActionView::LookupContextrendered_format
Removes deprecated find_file from ActionView::ViewPaths.
ActionView::ViewPathsfind_file
Removes deprecated support for passing a non-ActionView::LookupContext object as the first argument to ActionView::Base#initialize.
ActionView::Base#initializeActionView::LookupContext
Removes deprecated format argument from ActionView::Base#initialize.
ActionView::Base#initializeformat
Removes deprecated ActionView::Template#refresh.
ActionView::Template#refresh
Removes deprecated ActionView::Template#original_encoding.
ActionView::Template#original_encoding
Removes deprecated ActionView::Template#variants.
ActionView::Template#variants
Removes deprecated ActionView::Template#formats.
ActionView::Template#formats
Removes deprecated ActionView::Template#virtual_path=.
ActionView::Template#virtual_path=
Removes deprecated ActionView::Template#updated_at.
ActionView::Template#updated_at
Removes the deprecated updated_at argument required on ActionView::Template#initialize.
ActionView::Template#initializeupdated_at
Removes deprecated ActionView::Template.finalize_compiled_template_methods.
ActionView::Template.finalize_compiled_template_methods
Removes deprecated config.action_view.finalize_compiled_template_methods.
config.action_view.finalize_compiled_template_methods
Removes deprecated support for calling ActionView::ViewPaths#with_fallback with a block.
ActionView::ViewPaths#with_fallback
Removes 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::PathResolver
Removes deprecated support for calling private methods from objects in some view helpers.
Removes deprecated ActionDispatch::Http::ParameterFilter.
ActionDispatch::Http::ParameterFilter
Removes deprecated force_ssl at the controller level.
force_ssl
Removes deprecated ActionMailer::Base.receive in favor of Action Mailbox.
ActionMailer::Base.receive
Removes deprecated support for passing :combine_options operations to ActiveStorage::Transformers::ImageProcessing.
ActiveStorage::Transformers::ImageProcessing:combine_options
Removes the deprecated ActiveStorage::Transformers::MiniMagickTransformer.
ActiveStorage::Transformers::MiniMagickTransformer
Removes the deprecated config.active_storage.queue setting.
config.active_storage.queue
Removes the deprecated ActiveStorage::Downloading module.
ActiveStorage::Downloading
Replaces 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:cache
Removes deprecated rake routes tasks.
rake routes
Removes deprecated rake initializers tasks.
rake initializers
Removes deprecated support for the HOST environment variable to specify the server IP.
HOST
Removes the deprecated server argument from the rails server command.
rails server
Removes deprecated SOURCE_ANNOTATION_DIRECTORIES environment variable support from rails notes.
SOURCE_ANNOTATION_DIRECTORIESrails notes
Removes the deprecated connection option from the rails dbconsole command.
rails dbconsole
Removes deprecated rake notes tasks.
rake notes
Removes access to values in nested hashes returned by Rails.application.config_for via String keys.
Rails.application.config_for
Changes form_with to generate non-remote forms by default.
form_withconfig.action_view.form_with_generates_remote_forms
Environment 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_prepare
Removes the deprecated Module#reachable? method.
Module#reachable?
Removes the deprecated #acronym_regex method from Inflections.
Inflections#acronym_regex
Renames 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_name
Removes deprecated #set_state from the transaction object.
#set_state
Removes deprecated #supports_statement_cache? from the database adapters.
#supports_statement_cache?
Removes deprecated #insert_fixtures from the database adapters.
#insert_fixtures
Removes 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_key
Removes deprecated ActiveRecord::Migrator.migrations_path=.
ActiveRecord::Migrator.migrations_path=
Removes deprecated expand_hash_conditions_for_aggregates.
expand_hash_conditions_for_aggregates
Removes the deprecated image_alt helper.
image_alt
Removes ActionView::Helpers::RecordTagHelper.
ActionView::Helpers::RecordTagHelper
Removes the deprecated fragment_cache_key helper in favor of combined_fragment_cache_key.
fragment_cache_keycombined_fragment_cache_key
Removes 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_bundle
Removes deprecated support for old config.ru files that pass the application class as an argument to run.
config.rurun
Removes the deprecated environment argument from the rails commands.
environment
Removes the deprecated capify! method.
capify!
Removes the deprecated config.secret_token setting.
config.secret_token
ActiveSupport::Callbacks#halted_callback_hook now receives the halted callback name as a second argument.
ActiveSupport::Callbacks#halted_callback_hook
ActiveSupport::Duration.build now raises TypeError unless value is Numeric.
ActiveSupport::Duration.buildActiveSupport::Duration
Encapsulates each validation error as an Error object, changing the errors collection from a messages/details hash.
ActiveModel::Errorerrorsmessagefull_messagedetailserrors#to_hash
where.not now generates NAND predicates instead of NOR.
where.not
connects_to can now only be called on ActiveRecord::Base or abstract classes.
connects_toActiveRecord::Base
All connection adapters' execute now raises ActiveRecord::ConnectionNotEstablished instead of ActiveRecord::StatementInvalid on connection errors.
executeActiveRecord::ConnectionNotEstablishedActiveRecord::StatementInvalid
Mysql2Adapter#quote_string now raises ActiveRecord::ConnectionNotEstablished instead of ActiveRecord::StatementInvalid when it cannot connect.
Mysql2Adapter#quote_stringActiveRecord::ConnectionNotEstablishedActiveRecord::StatementInvalid
Calling connected_to on subclasses of ActiveRecord::Base is now disallowed.
ActiveRecord::Baseconnected_to
Freezes the database configurations hash to disallow mutations; use the DatabaseConfig object directly instead.
ActiveRecord::Base.configurationsDatabaseConfigActiveRecord::DatabaseConfigurations::HashConfigconfiguration_hash
Requires ActionView::Base subclasses to implement #compiled_method_container.
ActionView::Basecompiled_method_container
Makes the locals argument required on ActionView::Template#initialize.
ActionView::Template#initializelocals
Changes ActionDispatch::Response#content_type to return the full Content-Type header.
ActionDispatch::Response#content_type
fixture_file_upload now uses paths relative to file_fixture_path instead of fixture_path.
fixture_file_uploadfile_fixture_pathfixture_path
Stops 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_terminated
ActiveSupport::Callbacks#halted_callback_hook now receives the halted callback name as a second argument.
ActiveSupport::Callbacks#halted_callback_hook
ActiveSupport::Duration.build now raises TypeError unless value is Numeric, instead of building durations from Strings.
ActiveSupport::Duration.buildActiveSupport::DurationActiveSupport::Duration::Scalar
Encapsulates 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_h
Rails raises ActiveRecord::ReadOnlyError if any connection on the reading handler attempts a write.
ActiveRecord::ReadOnlyError
Ensures :reading connections always raise ActiveRecord::ReadOnlyError if a write is attempted.
ActiveRecord::ReadOnlyError:reading
Does not allow passing the column name to sum when a block is passed.
sumcount
Moves 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_exception
Defining an enum as a Hash with a blank key or an Array with a blank value now raises an ArgumentError.
ArgumentError
Enum raises an ArgumentError on invalid definition values; only a Hash, array of Symbols or array of Strings are allowed.
ArgumentError
Changes 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_for
ActionCable 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.enabled
Security37
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_format
Avoids regex backtracking in plain_text_for_blockquote_node in Action Text.
plain_text_for_blockquote_node
Includes 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_to
Implements SafeBuffer#bytesplice to address CVE-2023-28120.
SafeBuffer#bytesplice
Ignores certain data-* attributes in rails-ujs when the element is contenteditable, addressing CVE-2023-23913.
rails-ujs
Avoids regex backtracking in Inflector.underscore.
Inflector.underscore
Adds 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_64bit
Avoids regex backtracking on the If-None-Match header.
If-None-Match
Uses string#split instead of regex for domain parts.
String#split
Prevents 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_commentannotate
Changes 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_classes
Fixes 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_escape
Fixes 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:escape
Adds configurable allow-list validation for Active Storage image transformation methods, alongside the existing deny-list for arguments.
Variant
Fixes 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_HOST
Prevents 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_for
Fixes 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_exceptions
Deprecates Marshal.load on raw cache reads in RedisCacheStore due to CVE-2020-8165.
RedisCacheStoreMarshal.load
Avoids Marshal.load on raw cache values in MemCacheStore due to CVE-2020-8165.
MemCacheStoreMarshal.load
Checks 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@parameters
Includes Content-Length in the signature for ActiveStorage direct uploads due to CVE-2020-8162.
ActiveStorage
Fixes a possible XSS vector in the escape_javascript helper (CVE-2020-5267).
escape_javascript
Fixes a possible information leak and session hijacking vulnerability, tracked as CVE-2019-16782.
ActionDispatch::Session::MemcacheStore
Introduces ActionDispatch::HostAuthorization middleware to guard against DNS rebinding and Host header attacks.
ActionDispatch::HostAuthorizationRails.application.config.hosts
Platform1
Rails 6 requires Ruby 2.5.0 or newer.
Deprecated67
Deprecates ActiveSupport::Multibyte::Unicode.default_normalization_form.
ActiveSupport::Multibyte::Unicode.default_normalization_form
Deprecates 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::SHA1
Deprecates URI.parser, to be removed in Rails 6.2; use URI::DEFAULT_PARSER instead.
URI.parserURI::DEFAULT_PARSER
Documents require_dependency as obsolete in :zeitwerk mode and encourages not using it.
require_dependency
Deprecates 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_sql
Deprecates 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_format
Deprecates 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_cast
Deprecates 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_cast
Deprecates in_clause_length and allowed_index_name_length in DatabaseLimits.
in_clause_lengthallowed_index_name_lengthDatabaseLimits
Deprecates using return, break or throw to exit a transaction block after writes.
returnbreakthrow
Deprecates spec_name in favor of name on database configurations.
spec_namenameconfigs_forDatabaseConfig
Deprecates #remove_connection on the handler in favor of #remove_connection_pool; #remove_connection will be removed in 6.2.
#remove_connection#remove_connection_poolDatabaseConfig
Deprecates #default_hash and its alias #[] on database configurations; use configs_for instead, removal in 6.2.
#default_hash#[]configs_for
Deprecates "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_connection
Deprecates connection_config in favor of connection_db_config, which returns a DatabaseConfig instead of a Hash.
connection_configconnection_db_configDatabaseConfigurations::DatabaseConfig
Deprecates the database kwarg without replacement; use connects_to for new connections.
databaseconnects_to
Deprecates DatabaseConfigurations#to_h; connection hashes remain available via ActiveRecord::Base.configurations.configs_for.
DatabaseConfigurations#to_hActiveRecord::Base.configurations.configs_for
Adds DatabaseConfig#configuration_hash with symbol keys and deprecates DatabaseConfig#config.
DatabaseConfig#configuration_hashDatabaseConfig#config
Deprecates .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_translations
Deprecates config.action_dispatch.return_only_media_type_on_content_type.
config.action_dispatch.return_only_media_type_on_content_type
Deprecates config.active_job.return_false_on_aborted_enqueue.
config.active_job.return_false_on_aborted_enqueue
Deprecates Variant#service_url and Preview#service_url in favour of #url.
Variant#service_urlPreview#service_url#url
Deprecates 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_KEY
The classic autoloader starts its deprecation cycle; new projects should use zeitwerk and existing ones should switch.
classiczeitwerk
Deprecates Rails::DBConsole#config without replacement; use Rails::DBConsole.db_config.configuration_hash instead.
Rails::DBConsole#configRails::DBConsole.db_config.configuration_hash
Documents require_dependency as obsolete in :zeitwerk mode and encourages not using it.
require_dependency
Deprecates spec_name in favor of name on database configurations, including accessors on configs_for and DatabaseConfig.
spec_namenameconfigs_forDatabaseConfig
Deprecates #remove_connection in favor of #remove_connection_pool when called on the handler; removal planned for 6.2.
#remove_connection#remove_connection_poolDatabaseConfig
Deprecates #default_hash and its alias #[] on database configurations; use configs_for instead, removal planned for 6.2.
#default_hash#[]configs_for
Deprecates .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#urlBlob
Starts the deprecation cycle for the classic autoloader, recommending zeitwerk mode instead.
classiczeitwerk
Deprecates Rails::DBConsole#config without replacement, pointing to Rails::DBConsole.db_config.configuration_hash.
Rails::DBConsole#configRails::DBConsole.db_config.configuration_hash
Soft deprecates the database kwarg in connected_to by removing its documentation.
connected_to
Correctly deprecates where.not working as NOR for relations.
where.not
Deprecates Unicode#pack_graphemes and Unicode#unpack_graphemes in favor of native String methods.
ActiveSupport::Multibyte::Unicode#pack_graphemesActiveSupport::Multibyte::Unicode#unpack_graphemes
Deprecates 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_normalize
Deprecates Unicode#downcase, #upcase and #swapcase in favor of the String equivalents.
ActiveSupport::Multibyte::Unicode#downcaseActiveSupport::Multibyte::Unicode#upcaseActiveSupport::Multibyte::Unicode#swapcaseString#downcaseString#upcaseString#swapcase
Deprecates the use of LoggerSilence in favor of ActiveSupport::LoggerSilence.
LoggerSilenceActiveSupport::LoggerSilence
Deprecates using negative limits in String#first and String#last.
String#firstString#last
Deprecates config.activerecord.sqlite3.represent_boolean_as_integer.
config.activerecord.sqlite3.represent_boolean_as_integer
Deprecates passing migrations_paths to connection.assume_migrated_upto_version.
migrations_pathsconnection.assume_migrated_upto_version
Deprecates ActiveRecord::Result#to_hash in favor of ActiveRecord::Result#to_a.
ActiveRecord::Result#to_hashActiveRecord::Result#to_a
Deprecates 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_query
Deprecates 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_select
Deprecates ActionDispatch::Http::ParameterFilter in favor of ActiveSupport::ParameterFilter.
ActionDispatch::Http::ParameterFilterActiveSupport::ParameterFilter
Deprecates controller level force_ssl in favor of config.force_ssl.
force_sslconfig.force_ssl
Deprecate ActionMailer::Base.receive in favor of Action Mailbox.
ActionMailer::Base.receive
Add MailDeliveryJob for regular and parameterized mail, deprecating DeliveryJob and Parameterized::DeliveryJob.
MailDeliveryJobDeliveryJobParameterized::DeliveryJob
Replaces 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.purge
Deprecates rake routes in favor of rails routes.
rake routesrails routes
Deprecates rake initializers in favor of rails initializers.
rake initializersrails initializers
Deprecates rake dev:cache in favor of rails dev:cache.
rake dev:cacherails dev:cache
Deprecates rails notes subcommands in favor of passing an annotations argument to rails notes.
rails notesrails notes:customrails notes:optimizerails notes:todorails notes:fixme--annotations-a
Deprecates the SOURCE_ANNOTATION_DIRECTORIES environment variable in favor of config.annotations.register_directories.
SOURCE_ANNOTATION_DIRECTORIESRails::SourceAnnotationExtractor::Annotationconfig.annotations.register_directories
Deprecates rake notes in favor of rails notes.
rake notesrails notes
Deprecates using the HOST environment variable to specify the server IP in favor of BINDING.
HOSTBINDING
Deprecates passing the Rack server name as a regular argument to rails server in favor of the --using/-u option.
rails server--using-u