app/views/extface/devices/show.html.erb in extface-0.0.7 vs app/views/extface/devices/show.html.erb in extface-0.0.8

- old
+ new

@@ -39,16 +39,20 @@ <dd><%= distance_of_time_in_words_to_now @device.created_at %> ago</dd> <dt><%= t('.successful_jobs') %></dt> <dd> <%= @device.jobs.completed.count %> - (<%= t('.last') %>: <%= distance_of_time_in_words_to_now @device.jobs.maximum(:completed_at) %> ago) + <% if @device.jobs.completed.any? %> + (<%= t('.last') %>: <%= distance_of_time_in_words_to_now @device.jobs.maximum(:completed_at) %> ago) + <% end %> </dd> <dt><%= t('.failures') %></dt> <dd> <%= @device.jobs.failed.count %> - (<%= t('.last') %>: <%= distance_of_time_in_words_to_now @device.jobs.maximum(:failed_at) %> ago) + <% if @device.jobs.failed.any? %> + (<%= t('.last') %>: <%= distance_of_time_in_words_to_now @device.jobs.maximum(:failed_at) %> ago) + <% end %> </dd> </dl> </div>