zhishi-engine/zhishi-backend

View on GitHub
app/serializers/notifications/user_serializer.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Notifications
  class UserSerializer < ActiveModel::Serializer
    attributes :id, :name, :email, :points, :image, :url, :type

    private
      def url
        user_url(object)
      end

      def type
        'User'
      end
  end
end