scinote-web/app/serializers/user_serializer.rb
2023-12-06 14:12:22 +01:00

12 lines
273 B
Ruby

# 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