scinote-web/app/serializers/user_serializer.rb

13 lines
273 B
Ruby
Raw Normal View History

2023-12-05 03:59:16 +08:00
# frozen_string_literal: true
class UserSerializer < ActiveModel::Serializer
include Canaid::Helpers::PermissionsHelper
include Rails.application.routes.url_helpers
attributes :id, :name, :avatar_url
def avatar_url
avatar_path(object, :icon_small)
end
end