2013-02-05 14:16:51 -05:00
|
|
|
require_dependency 'excerpt_type'
|
|
|
|
|
|
|
|
class UserExcerptSerializer < ActiveModel::Serializer
|
|
|
|
include ExcerptType
|
|
|
|
|
|
|
|
# TODO: Inherit from basic user serializer?
|
2013-02-07 10:45:24 -05:00
|
|
|
|
2013-02-05 14:16:51 -05:00
|
|
|
attributes :bio_cooked, :username, :url, :name, :avatar_template
|
|
|
|
|
|
|
|
def url
|
|
|
|
user_path(object.username.downcase)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|