mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Merge pull request #1006 from bf4/inflector-testing
Fix adapter inflection bug for api -> API
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user