views/statistics.haml in cobweb-0.0.77 vs views/statistics.haml in cobweb-1.0.0
- old
+ new
@@ -134,15 +134,16 @@
%tr
%th Status code
%th Count
%tbody
- - @crawl[:statistics][:status_counts].keys.each do |status|
- - unless status.nil? || status == ""
- %tr
- %td= status
- %td= @crawl[:statistics][:status_counts][status]
+ - if @crawl[:statistics] && @crawl[:statistics][:status_counts]
+ - @crawl[:statistics][:status_counts].keys.each do |status|
+ - unless status.nil? || status == ""
+ %tr
+ %td= status
+ %td= @crawl[:statistics][:status_counts][status]
.medium
.box
.title
%h2 Mime type counts
@@ -154,13 +155,14 @@
%tr
%th Mime-type
%th Count
%tbody
- - @crawl[:statistics][:mime_counts].keys.each do |mime_type|
- %tr
- %td= mime_type
- %td= @crawl[:statistics][:mime_counts][mime_type]
+ - if @crawl[:statistics][:mime_counts]
+ - @crawl[:statistics][:mime_counts].keys.each do |mime_type|
+ %tr
+ %td= mime_type
+ %td= @crawl[:statistics][:mime_counts][mime_type]