是否绑定修改

This commit is contained in:
guange 2016-01-20 22:05:19 +08:00
parent 3df2a8a3cc
commit 27c2e9eddc
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class WechatsController < ActionController::Base
on :click, with: 'MY_NEWS' do |request, key| on :click, with: 'MY_NEWS' do |request, key|
uw = user_binded?(request[:FromUserName]) uw = user_binded?(request[:FromUserName])
if uw if uw && uw.user
ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5) ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5)
news = ua.map do |ua| 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}"} {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}"}