mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
21 lines
407 B
Ruby
21 lines
407 B
Ruby
class SpeakerSerializer < ActiveModel::Serializer
|
|
include ActionView::Helpers::TextHelper
|
|
|
|
attributes :guid, :name, :full_name, :company, :biography
|
|
|
|
def name
|
|
object.public_name
|
|
end
|
|
|
|
def full_name
|
|
[object.first_name, object.last_name].join(" ")
|
|
end
|
|
|
|
def biography
|
|
if object.biography.blank?
|
|
nil
|
|
else
|
|
simple_format(object.biography).gsub("\n", "")
|
|
end
|
|
end
|
|
end
|