diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-01-03 16:31:20 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-01-03 16:31:20 +0100 |
commit | 97e7ca48c139ea5cce2fa9b4be631946252a1ebd (patch) | |
tree | 528403f0fa25157dff6fc8c2993cf8bebe45443a | |
parent | 5aa869861c192daceafe3a3ee50eb93f5a2b7bd2 (diff) | |
download | rails-97e7ca48c139ea5cce2fa9b4be631946252a1ebd.tar.gz rails-97e7ca48c139ea5cce2fa9b4be631946252a1ebd.tar.bz2 rails-97e7ca48c139ea5cce2fa9b4be631946252a1ebd.zip |
Deprecate unused `symbolized_base_class` and `symbolized_sti_name`.
These methods were only used for the `IdentityMap` which was removed.
They are no longer used internally and should be removed without replacement.
As they were not `:nodoc:`'ed it's better to deprecate them before removal.
-rw-r--r-- | activerecord/CHANGELOG.md | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/inheritance.rb | 2 | ||||
-rw-r--r-- | guides/source/4_1_release_notes.md | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index e874486b53..c1739f113a 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +* Deprecate unused `ActiveRecord::Base.symbolized_base_class` + and `ActiveRecord::Base.symbolized_sti_name` without replacement. + + *Yves Senn* + * Since the `test_help.rb` in Railties now automatically maintains your test schema, the `rake db:test:*` tasks are deprecated. This doesn't stop you manually running other tasks on your test database diff --git a/activerecord/lib/active_record/inheritance.rb b/activerecord/lib/active_record/inheritance.rb index 7e1e120288..f144d84946 100644 --- a/activerecord/lib/active_record/inheritance.rb +++ b/activerecord/lib/active_record/inheritance.rb @@ -45,10 +45,12 @@ module ActiveRecord end def symbolized_base_class + ActiveSupport::Deprecation.warn("ActiveRecord::Base.symbolized_base_class is deprecated and will be removed without replacement.") @symbolized_base_class ||= base_class.to_s.to_sym end def symbolized_sti_name + ActiveSupport::Deprecation.warn("ActiveRecord::Base.symbolized_sti_name is deprecated and will be removed without replacement.") @symbolized_sti_name ||= sti_name.present? ? sti_name.to_sym : symbolized_base_class end diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 0de7860f7d..d2c3ba0493 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -432,6 +432,9 @@ for detailed changes. automatically maintained. See railties release notes. ([Pull Request](https://github.com/rails/rails/pull/13528)) +* Deprecate unused `ActiveRecord::Base.symbolized_base_class` + and `ActiveRecord::Base.symbolized_sti_name` without replacement. + ### Notable changes * Added `ActiveRecord::Base.to_param` for convenient "pretty" URLs derived from |