mirror of
https://github.com/openSUSE/osem.git
synced 2026-05-07 07:03:04 -04:00
added Speaker#full_name to the JSON API
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
class SpeakerSerializer < ActiveModel::Serializer
|
||||
include ActionView::Helpers::TextHelper
|
||||
|
||||
attributes :guid, :name, :company, :biography
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user