mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Remove root_name class method from Serializer, as it is used nowhere.
This commit is contained in:
parent
066990184b
commit
7847d05ecb
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
Breaking changes:
|
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)
|
- [#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.
|
* 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.
|
* using a class as a namespace that you also inherit from is complicated and circular at time i.e.
|
||||||
|
|||||||
@ -98,10 +98,6 @@ module ActiveModel
|
|||||||
ActiveModel::Serializer::Adapter.lookup(config.adapter)
|
ActiveModel::Serializer::Adapter.lookup(config.adapter)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.root_name
|
|
||||||
name.demodulize.underscore.sub(/_serializer$/, '') if name
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.serializers_cache
|
def self.serializers_cache
|
||||||
@serializers_cache ||= ThreadSafe::Cache.new
|
@serializers_cache ||= ThreadSafe::Cache.new
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user