mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Handle inflecting api to s/API/Api without side-effects
This commit is contained in:
parent
506739d4fb
commit
4359026c0e
@ -33,7 +33,8 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def self.adapter_class(adapter)
|
||||
"ActiveModel::Serializer::Adapter::#{adapter.to_s.classify}".safe_constantize
|
||||
adapter_name = adapter.to_s.classify.sub("API", "Api")
|
||||
"ActiveModel::Serializer::Adapter::#{adapter_name}".safe_constantize
|
||||
end
|
||||
|
||||
def fragment_cache(*args)
|
||||
@ -42,7 +43,7 @@ module ActiveModel
|
||||
|
||||
private
|
||||
|
||||
def cache_check(serializer)
|
||||
def cache_check(serializer)
|
||||
@cached_serializer = serializer
|
||||
@klass = @cached_serializer.class
|
||||
if is_cached?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user