discourse/app/serializers/user_excerpt_serializer.rb
2013-02-07 16:45:24 +01:00

14 lines
288 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