I am using RiCal gem to cr开发者_如何转开发eate calendar event in my ROR project. The issue i have is when i add attendee it adds the attendee as .
ATTENDEE:mailto:sanjay.swain@in.ibm.com ATTENDEE:mailto:sanjayswa@gmail.com
But I want ATTENDEE as
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;CN=sanjay.swain@in.ibm.com;X-NUM-GUESTS=0:mailto:sanjay.swain@in.ibm.c om
with ROLE, PARTSTAT etc.. Is there a way to get this result using RiCal gem..
I found the solution. Here is what I have done:
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
精彩评论