Wednesday, June 4, 2008

events calendars in rails appllication

I am currently working on a rails application, which is supposed to allows users to create events (holidays) and view shared events on a calendar. the requirements are simple. the required calendars are merely views. there is no interactivity needed other than providing links to the events.
so like any rails enthusiast, i went to Google and assumed i would find plenty of stuff to help me. it turns out my expectations were too high.
i found one worth while simple rails integrated calendar, its the calendar helper, which is bundled as a rails plugin. you can find it here : http://topfunky.net/svn/plugins/calendar_helper/
the plugin provides a function that can be embedded in a any view to create a calendar. its CSS is not that good. it however provide a starting point.
another option we had is embedding a Google calendar. the idea is that the rails application will have a Google account from which it can manipulate events on the calendar. Google calendar does provide a lot of integration libraries in many languages( php, .net ). sadly though, none for rails or ruby. there was one plugin for Google calendar that was available for rails (benjamin.francisoud.googlepages.com/googlecalendar). we gave it a shot .
problems we faced :
the plugin doesn't pick up the event id (provided by google ) after inserting. so you can really update events ( you have no reference id to them) . and even API doesn't support any of this functionality. i.e the plugin only lets you insert events ( no edit, deletes, or updates) . (this is what we found at the time of this post).
We are working on getting this calendar into a shape, and we will release the new code once we think its mature enough and usable by others.