Remove deprecated ActiveRecord::Base
config accessors
This commit is contained in:
parent
696ccbc265
commit
96c9db1b48
@ -1,3 +1,7 @@
|
||||
* Remove deprecated `ActiveRecord::Base` config accessors.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
* Remove the `:include_replicas` argument from `configs_for`. Use `:include_hidden` argument instead.
|
||||
|
||||
*Eileen M. Uchitelle*
|
||||
@ -138,7 +142,7 @@
|
||||
|
||||
*Matthew Draper*, *Ole Friis*
|
||||
|
||||
* `ActiveRecord::Base#signed_id` raises if called on a new record
|
||||
* `ActiveRecord::Base#signed_id` raises if called on a new record.
|
||||
|
||||
Previously it would return an ID that was not usable, since it was based on `id = nil`.
|
||||
|
||||
|
@ -288,31 +288,6 @@ def find_by!(*args) # :nodoc:
|
||||
find_by(*args) || where(*args).raise_record_not_found_exception!
|
||||
end
|
||||
|
||||
%w(
|
||||
reading_role writing_role default_timezone index_nested_attribute_errors
|
||||
verbose_query_logs queues warn_on_records_fetched_greater_than maintain_test_schema
|
||||
application_record_class action_on_strict_loading_violation schema_format error_on_ignored_order
|
||||
timestamped_migrations dump_schema_after_migration dump_schemas suppress_multiple_database_warning
|
||||
).each do |attr|
|
||||
module_eval(<<~RUBY, __FILE__, __LINE__ + 1)
|
||||
def #{attr}
|
||||
ActiveRecord.deprecator.warn(<<~MSG)
|
||||
ActiveRecord::Base.#{attr} is deprecated and will be removed in Rails 7.1.
|
||||
Use `ActiveRecord.#{attr}` instead.
|
||||
MSG
|
||||
ActiveRecord.#{attr}
|
||||
end
|
||||
|
||||
def #{attr}=(value)
|
||||
ActiveRecord.deprecator.warn(<<~MSG)
|
||||
ActiveRecord::Base.#{attr}= is deprecated and will be removed in Rails 7.1.
|
||||
Use `ActiveRecord.#{attr}=` instead.
|
||||
MSG
|
||||
ActiveRecord.#{attr} = value
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
|
||||
def initialize_generated_modules # :nodoc:
|
||||
generated_association_methods
|
||||
end
|
||||
|
@ -95,7 +95,9 @@ Please refer to the [Changelog][active-record] for detailed changes.
|
||||
|
||||
### Removals
|
||||
|
||||
* Remove support for `ActiveRecord.legacy_connection_handling`.
|
||||
* Remove support for `ActiveRecord.legacy_connection_handling`.
|
||||
|
||||
* Remove deprecated `ActiveRecord::Base` config accessors
|
||||
|
||||
* Remove support for `:include_replicas` on `configs_for`. Use `:include_hidden` instead.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user