Skip to content

Commit

Permalink
Fix AMS head adapter names
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed Apr 7, 2016
1 parent 5bcaa85 commit e2a8391
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/skylight/normalizers/active_model_serializers/render.rb
Expand Up @@ -12,7 +12,9 @@ def normalize(trace, name, payload)
title = serializer_class.name.sub(/^ActiveModel::(Serializer::)?/, '')

if adapter_instance = payload[:adapter]
adapter_name = adapter_instance.class.name.sub(/^ActiveModel::Serializer::Adapter::/, '')
adapter_name = adapter_instance.class.name
.sub(/^ActiveModel::Serializer::Adapter::/, '')
.sub(/^ActiveModelSerializers::Adapter::/, '')
desc = "Adapter: #{adapter_name}"
end

Expand Down

0 comments on commit e2a8391

Please sign in to comment.