With Ruby on Rails 5.2.0.Beta2 out now, its release candidate and official release is probably right around the corner. In efforts to clean up some of the code base, some methods have been deprecated. If you have been keeping your apps up to date with the latest stable releases, chances are that you have noticed these for some time coming as the via the deprecation notices in the application logs.
For easy searching purposes, I’ve parsed through the logs of all of the upcoming deprecations in Ruby on Rails 5.2.0. These were taken straight out of the CHANGELOGs.
We will be releasing January’s free screencast of some of the upcoming features in Ruby on Rails 5.2.0.
Overall, this has been a pretty light release for deprecations which is really nice. Hopefully, updating a Ruby on Rails app from 5.1.X to 5.2.X will be a fairly smooth transition.
Action Cable
https://github.com/rails/rails/blob/v5.2.0.beta2/actioncable/CHANGELOG.md
Removed Deprecations
- Removed deprecated evented redis adapter.
New Deprecations
- None
Action Mailer
https://github.com/rails/rails/blob/v5.2.0.beta2/actionmailer/CHANGELOG.md
Removed Deprecations
- None
New Deprecations
- None
Action Pack
https://github.com/rails/rails/blob/v5.2.0.beta2/actionpack/CHANGELOG.md
Removed Deprecations
- Remove deprecated
ActionController::ParamsParser::ParseError
New Deprecations
- Deprecate
ActionDispatch::TestResponse
response aliases
Action View
https://github.com/rails/rails/blob/v5.2.0.beta2/actionview/CHANGELOG.md
Removed Deprecations
- Remove deprecated Erubis ERB handler.
New Deprecations
- None
Action Job
https://github.com/rails/rails/blob/v5.2.0.beta2/activejob/CHANGELOG.md
Removed Deprecations
- None
New Deprecations
- None
Active Model
https://github.com/rails/rails/blob/v5.2.0.beta2/activemodel/CHANGELOG.md
Removed Deprecations
- None
New Deprecations
- None
Active Record
https://github.com/rails/rails/blob/v5.2.0.beta2/activerecord/CHANGELOG.md
Removed Deprecations
- Remove deprecated method
#sanitize_conditions
. - Remove deprecated method
#scope_chain
. - Remove deprecated configuration
.error_on_ignored_order_or_limit
. - Remove deprecated arguments from
#verify!
. - Remove deprecated argument
name
from#indexes
. - Remove deprecated method
ActiveRecord::Migrator.schema_migrations_table_name
. - Remove deprecated method
supports_primary_key?
. - Remove deprecated method
supports_migrations?
. - Remove deprecated methods
initialize_schema_migrations_table
andinitialize_internal_metadata_table
. - Remove deprecated support to passing a class to
:class_name
on associations. - Remove deprecated argument
default
fromindex_name_exists?
. - Remove deprecated support to
quoted_id
when typecasting an Active Record object. - Remove deprecated
#migration_keys
.
New Deprecations
- Deprecate
set_state
method inTransactionState
- Deprecate delegating to
arel
inRelation
. - Deprecate passing arguments and block at the same time to
count
andsum
inActiveRecord::Calculations
. - Deprecate
supports_statement_cache?
.
Active Storage (new!)
https://github.com/rails/rails/blob/v5.2.0.beta2/activestorage/CHANGELOG.md
Removed Deprecations
- None
New Deprecations
- None
Active Support
https://github.com/rails/rails/blob/v5.2.0.beta2/activesupport/CHANGELOG.md
Removed Deprecations
- Remove deprecated
halt_callback_chains_on_return_false
option. - Remove deprecated
:if
and:unless
string filter for callbacks.
New Deprecations
- Deprecate
secrets.secret_token
. - Deprecate
Module#reachable?
method.