I am getting error while trying to create ics
file please review my code whats wrong with this:
uninitialized constant PackagesController::RiCal
Do I need to include or something else?
def i_cal
pack = Administration::MerchantPackage.find(params[:id])
loc = pack.offering.merchant.address.to_s + pack.offering.merchant.city.to_s
cal = RiCal.Calendar do
event do
description pack.subtitle
dtstart DateTime.parse(pack.start_date.strftime('%m/%d/%Y %H:%M:%S'))
dtend DateTime.parse(pack.end_date.strftime('%m/%d/%Y %H:%M:%S'))
location loc
add_attendee current_user.email rescue ''
alarm do
description "Segment 51"
end
end
end
When I try ::RiCal.Calendar
it give me error:
uninitialized constant RiCal
Aucun commentaire:
Enregistrer un commentaire