» The proper way of using the ORGANIZER attribute in iCalendar format
Posted by Kasper Tidemann on Monday 11th of January 2010 03:24:15 AM
Working with the iCalendar format using Ruby on Rails brings many possibilities of quickly getting data generated by using gems such as iCalendar. However, the gem seems not to handle the ORGANIZER attribute in a proper way. What it does is the following:
ORGANIZER:Kasper Tidemann
… which will make the ORGANIZER info not show in iCal. However, it will work if you remove the spaces in the attribute’s value, that is, it will work if you do the following:
ORGANIZER:KasperTidemann
… but while it may work, it’s not really what we want. The organizer’s name is not “KasperTidemann” to be exact, but “Kasper Tidemann”. Now, while this post deals with fixing the use of the iCalendar gem to make the organizer tag show properly in iCal, the following principle is general and should always be followed.
To make iCal show you the name of the organizer plus the person’s e-mail address, what you need is for the ORGANIZER attribute to look like this:
ORGANIZER;CN=Kasper Tidemann:mailto:kt@meeho.dk
This way, it will show up in iCal like this:

Screenshot of iCal showing the organizer info. Please do not mind the Danish attribute names.
I have written the maintenance guys of the gem, but they haven’t replied me yet. Until then, you can either modify the gem yourself or use the custom_property method they’ve supplied the gem with:
event.custom_property("ORGANIZER;CN=Kasper Tidemann:mailto", "kt@meeho.dk")
It’s kind of not the way you would use the method, since you’re really supposed to simply type in an attribute name as the first parameter and the attribute value as the second, but hey, the above works and will help you out until the gem itself is fixed.





