json API for suseconferenceclient

This commit is contained in:
Ancor Gonzalez Sosa 2013-07-08 10:07:12 +02:00
parent d648ab7cb5
commit d95d8f234b
12 changed files with 159 additions and 8 deletions

View file

@ -0,0 +1,17 @@
class SpeakerSerializer < ActiveModel::Serializer
include ActionView::Helpers::TextHelper
attributes :guid, :name, :company, :biography
def name
object.public_name
end
def biography
if object.biography.blank?
nil
else
simple_format(object.biography).gsub("\n", "")
end
end
end