From eacafbcc86e3bf668f09fb844d3a7cd78e60a34b Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 18 Sep 2015 14:57:38 +0800 Subject: [PATCH] small change for new widget, categories removed from left side. --- app/controllers/news_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 3353bcd..c2fe0cd 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -207,7 +207,7 @@ class NewsController < ApplicationController link = page.nil? ? "#" : "/#{I18n.locale.to_s + page.url}/" categories_for_dropdown.unshift({"name" => t("news.all"), "category-link" => link}) - hot_news = NewsBulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :category_id.in => categories.collect{|cat| cat.id}, :is_hot => true).can_display.is_approved.desc(:postdate).limit(1) + hot_news = NewsBulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_hot => true).can_display.is_approved.desc(:postdate).limit(1) hot_news = hot_news.first categories.each_with_index do |category,index| if hot_news.nil?