From d8323ecfef105a09ce86e75d6872fde383324efe Mon Sep 17 00:00:00 2001 From: Niko Strijbol Date: Mon, 13 Jan 2020 14:34:12 +0100 Subject: [PATCH] Don't put soon events in ical --- lib/helpers/ical.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/helpers/ical.rb b/lib/helpers/ical.rb index 1369e0f..e11e1ef 100644 --- a/lib/helpers/ical.rb +++ b/lib/helpers/ical.rb @@ -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