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