如何使用 Rails 和 ri_cal 创建 .ics 文件?
我正在使用 Rails 3 和 ri_cal gem。我无法生成有效的 .ics 文件。它已生成,但 AppleCalendar 或 GoogleCalendar 说它是空的。我做错了什么? 感谢帮助,提前致谢:)
我的控制器
class WebsitesController < ApplicationController
def index
respond_to do |format|
format.ics
end
end
end
和index.ics.builer
RiCal.Calendar do
event do
description "MA-6 First US Manned Spaceflight"
dtstart DateTime.parse("2/20/1962 14:47:39")
dtend DateTime.parse("2/20/1962 19:43:02")
location "Cape Canaveral"
add_attendee "[email protected]"
alarm do
description "Segment 51"
end
end
end
I am using rails 3 and the ri_cal gem. I am not able to produce a valid .ics file. It gets generated, but AppleCalendar or GoogleCalendar say it's empty. What did I do wrong?
Help appreciated, thanks in advance :)
My Controller
class WebsitesController < ApplicationController
def index
respond_to do |format|
format.ics
end
end
end
and index.ics.builer
RiCal.Calendar do
event do
description "MA-6 First US Manned Spaceflight"
dtstart DateTime.parse("2/20/1962 14:47:39")
dtend DateTime.parse("2/20/1962 19:43:02")
location "Cape Canaveral"
add_attendee "[email protected]"
alarm do
description "Segment 51"
end
end
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够成功地创建 ICS,而
无需离散构建器
I was able to succeed in getting an ICS created by
no need for the discrete builder