From 19b04a49d01af1917385c166501ef086eddae437 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Wed, 23 Apr 2014 22:50:29 -0400 Subject: The users with permissions to send alerts can now create new alerts. --- app/views/alerts/index.html.erb | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'app/views/alerts/index.html.erb') diff --git a/app/views/alerts/index.html.erb b/app/views/alerts/index.html.erb index 458b951..1d441a2 100644 --- a/app/views/alerts/index.html.erb +++ b/app/views/alerts/index.html.erb @@ -12,14 +12,18 @@ - <% @alerts.each do |alert| %> - - <%= alert.author %> - <%= alert.message %> - <%= link_to 'Show', alert %> - <%= link_to 'Edit', edit_alert_path(alert) %> - <%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %> - + <% if !@alerts.nil? %> + <% @alerts.each do |alert| %> + + <%= alert.author %> + <%= alert.message %> + <%= link_to 'Show', alert %> + <%= link_to 'Edit', edit_alert_path(alert) %> + <%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %> + + <% end %> + <% else %> +

There are no alerts!

<% end %> -- cgit v1.2.3-2-g168b