summaryrefslogtreecommitdiff
path: root/app/views/alerts/index.html.erb
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-23 23:30:40 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-23 23:30:40 -0400
commit1429cd41bb4af3429f28dc97efd6994433ebde7b (patch)
tree5db4b36315bd4d6cab60263bbf8a8180dec3fee6 /app/views/alerts/index.html.erb
parent081b7cb82d5869bc43605223c301f7fed8dd50e2 (diff)
parenta6f801b7f5a2b9ca1b61ecc305a31f76be8c8238 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/views/alerts/index.html.erb')
-rw-r--r--app/views/alerts/index.html.erb20
1 files changed, 12 insertions, 8 deletions
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 @@
</thead>
<tbody>
- <% @alerts.each do |alert| %>
- <tr>
- <td><%= alert.author %></td>
- <td><%= alert.message %></td>
- <td><%= link_to 'Show', alert %></td>
- <td><%= link_to 'Edit', edit_alert_path(alert) %></td>
- <td><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %></td>
- </tr>
+ <% if !@alerts.nil? %>
+ <% @alerts.each do |alert| %>
+ <tr>
+ <td><%= alert.author %></td>
+ <td><%= alert.message %></td>
+ <td><%= link_to 'Show', alert %></td>
+ <td><%= link_to 'Edit', edit_alert_path(alert) %></td>
+ <td><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ <% else %>
+ <td><p>There are no alerts!</p></td>
<% end %>
</tbody>
</table>