1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Yves Senn 2014-01-03 16:31:20 +01:00
parent 5aa869861c
commit 97e7ca48c1
3 changed files with 10 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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