diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 16f88e47..5ec1b266 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -4,6 +4,7 @@ class DashboardController < ApplicationController def show @repositories = Repository.all @statuses = @repositories.map(&:current_status) + @last_status = RepositoryStatus.last end def about; end diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index 58e72db9..6e4db8e4 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -6,7 +6,7 @@ Hej! Nice to meet you :) .sub.header Last sync was - = @statuses.last.created_at + = @last_status&.created_at .ui.large.header Operating System Support .ui.five.cards