Merge pull request #1231 from beauby/remove-dead-code

Remove `root_name` class method from Serializer, as it is used nowhere.
This commit is contained in:
L. Preston Sego III 2015-10-05 12:55:24 -04:00
commit ea1a709b54
2 changed files with 1 additions and 4 deletions

View File

@ -2,6 +2,7 @@
Breaking changes:
- [#1131](https://github.com/rails-api/active_model_serializers/pull/1131) Remove Serializer#root_name (@beauby)
- [#1138](https://github.com/rails-api/active_model_serializers/pull/1138) Introduce Adapter::Base (@bf4)
* Adapters now inherit Adapter::Base. 'Adapter' is now a module, no longer a class.
* using a class as a namespace that you also inherit from is complicated and circular at time i.e.

View File

@ -98,10 +98,6 @@ module ActiveModel
ActiveModel::Serializer::Adapter.lookup(config.adapter)
end
def self.root_name
name.demodulize.underscore.sub(/_serializer$/, '') if name
end
def self.serializers_cache
@serializers_cache ||= ThreadSafe::Cache.new
end