From 4251766b3e4941652449566de0e2175e3b5d47cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Cahenzli?= Date: Thu, 14 Oct 2010 22:56:09 +0800 Subject: [PATCH] Fixing nil error when exporting events to iCal that have no notes. --- app/helpers/todos_helper.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index fd155d03..adb0704a 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -280,8 +280,11 @@ module TodosHelper end def format_ical_notes(notes) - split_notes = notes.split(/\n/) - joined_notes = split_notes.join("\\n") + unless notes.blank? + split_notes = notes.split(/\n/) + joined_notes = split_notes.join("\\n") + end + joined_notes || "" end def formatted_pagination(total)