Changing date format in JSON API to match suseconferenceclient expectations

This commit is contained in:
Ancor Gonzalez Sosa 2013-07-17 13:10:50 +02:00
parent 7f3c8a65de
commit 0c20151de8

View file

@ -5,7 +5,8 @@ class EventSerializer < ActiveModel::Serializer
:speaker_ids, :type, :room, :track
def date
object.start_time
t = object.start_time
t.blank? ? "" : %(#{t.time.strftime("%Y-%m-%dT%H:%M:%S")}#{t.formatted_offset(false)})
end
def speaker_ids