From 27c2e9eddc06b1b998447f76c81bfff023c1d8b3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 20 Jan 2016 22:05:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=AF=E5=90=A6=E7=BB=91=E5=AE=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 19644a624..78522d1ed 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -119,7 +119,7 @@ class WechatsController < ActionController::Base on :click, with: 'MY_NEWS' do |request, key| uw = user_binded?(request[:FromUserName]) - if uw + if uw && uw.user ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5) news = ua.map do |ua| {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}"}