Manish Nautiyal
2012-Mar-20 08:47 UTC
Google calendar is not working properly with gcal4ruby (0.2.6)
I''m using
Rails - 2.2.2
gcal4ruby (0.2.6)
I''m using google calendar to display events for users in my website.
Till 18-march-2012 everything was working fine. But now whenever user
add events to the calendar it show only busy in the calendar.
My code is
def add_event
user_id = current_user.id
service = GCal4Ruby::Service.new
service.authenticate("username-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org",
"password")
calendar = GCal4Ruby::Calendar.find(service,
''Events'' ,
{:scope => :first})
title = params[:events][:location].upcase+'' -
''+params[:events][:traveller].upcase+'' -
''+params[:events][:title]
event = GCal4Ruby::Event.new(calendar)
event.title = title
event.content = params[:events][:content]
event.where = params[:events][:location]
event.start = Time.parse("#{sdate} at #{kstime} ")
event.end = Time.parse("#{edate} at #{ketime}")
if !event.save
return false
else
event_id = event.id
Event.add_event(event_id,params[:events][:traveller],params[:events][:title],
params[:events][:content], params[:events][:location], sdate, stime,
edate, etime, user_id)
end
redirect_to :action=>"index"
end
Attachments:
http://www.ruby-forum.com/attachment/7167/37.jpg
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
