2010-06-09 5 views
0

J'utilise RiCal gem pour créer un événement de calendrier dans mon projet ROR. Le problème que j'ai est quand j'ajoute un participant, il ajoute le participant comme.RiCal add_attendee issue

PARTICIPANT: mailto: [email protected] PARTICIPANT: mailto: [email protected]

Mais je veux que PARTICIPANT

PARTICIPANT; CUTYPE = INDIVIDUEL; RÔLE = REQ- PARTICIPANT; PARTSTAT = BESOINS-ACTION; RSVP = TRUE; [email protected]; X-NUM-PERSONNES = 0: mailto: [email protected] om

avec ROLE, PARTSTAT etc .. Y at-il un moyen d'obtenir ce résultat en utilisant RiCal gem ..

Répondre

4

J'ai trouvé la solution. Voici ce que je l'ai fait:

options = {'CUTYPE' => 'INDIVIDUAL','RSVP' => 'TRUE','ROLE' => 'REQ-PARTICIPANT','PARTSTAT' => 'NEEDS-ACTION','X-NUM-GUESTS' => '0'} 
attendee_property = RiCal::PropertyValue::CalAddress.new(nil, :value => "mailto:"+attend, :params => options) 
event.attendee_property = attendee_property 
+0

J'ai trouvé la solution par moi-même – Sanjay

+0

suggèrent event.attendee_property << attendee_property pour soutenir de nombreux participants –