From ee3c81422d95617ecfc5539ec6774adeb97273c6 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 12 Apr 2013 18:31:23 -0400 Subject: [PATCH] Ignore blank sections --- app/views/alerts/index.html.erb | 2 +- app/views/alerts/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/alerts/index.html.erb b/app/views/alerts/index.html.erb index 3a91420..7e93012 100644 --- a/app/views/alerts/index.html.erb +++ b/app/views/alerts/index.html.erb @@ -23,7 +23,7 @@ <%= alert.user_id %> <%= alert.department %> <%= alert.course %> - <%= alert.sections.join(', ') %> + <%= alert.sections.reject { |v| v.blank? }.join(', ') %> <%= alert.semester %> <%= alert.alerted %> <%=l alert.created_at %> diff --git a/app/views/alerts/show.html.erb b/app/views/alerts/show.html.erb index ad79a65..07263e8 100644 --- a/app/views/alerts/show.html.erb +++ b/app/views/alerts/show.html.erb @@ -11,7 +11,7 @@
<%= model_class.human_attribute_name(:course) %>:
<%= @alert.course %>
<%= model_class.human_attribute_name(:sections) %>:
-
<%= @alert.sections.join(', ') %> 
+
<%= @alert.sections.reject { |v| v.blank? }.join(', ') %> 
<%= model_class.human_attribute_name(:semester) %>:
<%= @alert.semester %>
<%= model_class.human_attribute_name(:alerted) %>: