views:

18

answers:

1

I am using RiCal gem to create calendar event in my ROR project. The issue i have is when i add attendee it adds the attendee as .

ATTENDEE:mailto:[email protected] ATTENDEE:mailto:[email protected]

But I want ATTENDEE as

ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;[email protected];X-NUM-GUESTS=0:mailto:[email protected] om

with ROLE, PARTSTAT etc.. Is there a way to get this result using RiCal gem..

A: 

I found the solution here 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
Sanjay
I found the solution by myself
Sanjay