When you change the name of the class to be HalJsonSerializer, it will enforce you to change the media_type key to be hal_json. Have a look at default_media_type method in serializer.rb.