From c25a3d3e922075025b85b95e75d8fc204ad328d0 Mon Sep 17 00:00:00 2001 From: JiangRu Date: Mon, 1 Dec 2014 14:28:46 +0800 Subject: [PATCH] update title language show --- app/controllers/web_resources_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/web_resources_controller.rb b/app/controllers/web_resources_controller.rb index 17a5382..41cc74d 100644 --- a/app/controllers/web_resources_controller.rb +++ b/app/controllers/web_resources_controller.rb @@ -1,7 +1,7 @@ class WebResourcesController < ApplicationController def index - links = WebLink.can_display.filter_by_categories + links = WebLink.where(:title.ne => "").can_display.filter_by_categories web_link = links.collect do |link| statuses = link.statuses_with_classname.collect do |status| { @@ -22,11 +22,11 @@ class WebResourcesController < ApplicationController "widget-title"=>t(:web_resource) }, "total_pages" => links.total_pages - } + } end def widget - links = WebLink.can_display.filter_by_widget_categories + links = WebLink.where(:title.ne => "").can_display.filter_by_widget_categories web_link = links.collect do |link| statuses = link.statuses_with_classname.collect do |status| { @@ -44,7 +44,7 @@ class WebResourcesController < ApplicationController { "web_link" => web_link, "extras" => {"widget-title"=>t(:web_resource),"more_url" => OrbitHelper.widget_more_url} - } + } end - + end