mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 03:25:31 -05:00
15 lines
290 B
Ruby
15 lines
290 B
Ruby
|
require_dependency 'excerpt_type'
|
||
|
|
||
|
class UserExcerptSerializer < ActiveModel::Serializer
|
||
|
include ExcerptType
|
||
|
|
||
|
# TODO: Inherit from basic user serializer?
|
||
|
|
||
|
attributes :bio_cooked, :username, :url, :name, :avatar_template
|
||
|
|
||
|
def url
|
||
|
user_path(object.username.downcase)
|
||
|
end
|
||
|
|
||
|
end
|