Skip to content

Instantly share code, notes, and snippets.

@thekarladam
Created January 13, 2011 06:13
Show Gist options
  • Save thekarladam/777480 to your computer and use it in GitHub Desktop.
Save thekarladam/777480 to your computer and use it in GitHub Desktop.
importContents = open("...")
Time.zone = @timezone
events = ActiveSupport::JSON.decode(importContents)
newEvents = []
events.each { |anEvent|
aEvent = Event.new( :title => anEvent["title"],
:event_type => anEvent["type"],
:description => anEvent["description"],
:location => anEvent["location"],
:start => anEvent["sessionStartTime"],
:end => anEvent["sessionEndTime"],
:conference => self)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment