3

Is there any way to set an organizer's name with ri_cal?

The RFC shows it done this way:

 ORGANIZER;CN="John Smith":MAILTO:jsmith@host.com

But I can't figure out if there is a way to add the ;CN="foo" part to the ORGANIZER entry with ri_cal.

Luke Francl
  • 31,028
  • 18
  • 69
  • 91

2 Answers2

3

Had this exact same problem. The solution is, strangely enough, to say 'event.organizer_property' instead of 'event.organizer' ... like this:

      options = {'CN' => our_event.parent.title}
      organizer_property = RiCal::PropertyValue::CalAddress.new(nil,
                                                               :value => url,
                                                               :params => options)
      event.organizer_property = organizer_property

The generated ICS is then correct, like so, with the CN property between the semicolon and the colon:

      ORGANIZER;CN=The Bold Italic:http://localhost/clips/3-the-bold-italic
  • 1
    ri_cal doesn't seem to escape the property values at all so you need to consider if you need to escape the value - this SO article is useful: http://stackoverflow.com/questions/3014137/can-should-ical-property-parametrs-be-escaped – RidingTheRails Oct 31 '13 at 20:52
0

Gave up, switched to the icalendar gem.

Luke Francl
  • 31,028
  • 18
  • 69
  • 91