开发者

RiCal add_attendee issue

开发者 https://www.devze.com 2023-01-03 01:20 出处:网络
I am using RiCal gem to cr开发者_如何转开发eate calendar event in my ROR project. The issue i haveis when i add attendee it adds the attendee as .

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
0

精彩评论

暂无评论...
验证码 换一张
取 消