mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
added Speaker#full_name to the JSON API
This commit is contained in:
parent
0c20151de8
commit
f905bb8f8f
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue