Support JSONP exports of conference schedules for embedding

Currently, it's rather difficult to use OSEM and embed a schedule into another website. We currently use OSEM for the backend, but still use a different system for our main site. This change allows us to dynamically embed the schedule in our main website as well as allow us a simple way to get data for the use in mobile applications or similar.

This limits the JSONP support to only GETS on json formatted requests. This prevents any XSS even though we don't require a authenticity token.
This commit is contained in:
Rob Smith 2015-10-09 22:28:45 -07:00
parent eface6a91b
commit b9a2a80a75
3 changed files with 82 additions and 1 deletions

View file

@ -20,7 +20,9 @@ class ConferenceSerializer < ActiveModel::Serializer
# FIXME: adjusting the format the DIRTY way, for oSC13.
# If you think this is ugly, don't look at the methods below
def date_range
object.date_range_string.try(:split, ',').try(:first)
if defined? object.date_range_string
object.date_range_string.try(:split, ',').try(:first)
end
end
# FIXME: just giving suseconferenceclient something to play with