From cd80bf413c5f23e24e62195b3cf5c86f08c6721e Mon Sep 17 00:00:00 2001 From: Dany Marcoux Date: Wed, 25 Apr 2018 16:55:32 +0200 Subject: [PATCH] [webui] Be coherent with variables name --- src/api/app/controllers/webui/main_controller.rb | 2 +- src/api/app/views/webui/main/_status_messages.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/app/controllers/webui/main_controller.rb b/src/api/app/controllers/webui/main_controller.rb index 39b75591f52..176a2c21b34 100644 --- a/src/api/app/controllers/webui/main_controller.rb +++ b/src/api/app/controllers/webui/main_controller.rb @@ -21,7 +21,7 @@ def gather_busy end def index - @news = StatusMessage.alive.limit(4).to_a + @status_messages = StatusMessage.alive.limit(4).to_a @workerstatus = Rails.cache.fetch('workerstatus_hash', expires_in: 10.minutes) do WorkerStatus.hidden.to_hash end diff --git a/src/api/app/views/webui/main/_status_messages.html.haml b/src/api/app/views/webui/main/_status_messages.html.haml index e34012a9dba..d26493e5159 100644 --- a/src/api/app/views/webui/main/_status_messages.html.haml +++ b/src/api/app/views/webui/main/_status_messages.html.haml @@ -1,9 +1,9 @@ -- if @news.present? || User.current.is_admin? +- if @status_messages.present? || User.current.is_admin? .box.box-shadow#messages %h2.box-header Announcements \#{link_to('', news_feed_path(format: 'rss'), { class: 'alignright icons-feeds', title: 'RSS Feed' })} - - @news.each do |msg| + - @status_messages.each do |msg| .grid_4.news-sender = user_with_realname_and_icon msg.user, short: true wrote #{time_ago_in_words(msg.created_at)} ago