Don't put soon events in ical

This commit is contained in:
Niko Strijbol 2020-01-13 14:34:12 +01:00
parent 93aef1e251
commit d8323ecfef
No known key found for this signature in database
GPG key ID: 1A8AEBABD9012251

View file

@ -2,9 +2,9 @@ module IcalHelper
def event_calendar
cal = Icalendar::Calendar.new
items.find_all('/events/*/*.md').each do |i|
cal.add_event(event_for(i))
end
items.find_all('/events/*/*.md')
.select { |x| x[:soon] == nil }
.each {|i| cal.add_event(event_for(i)) }
cal.to_ical
end