认证后回复消息

This commit is contained in:
guange 2016-01-19 15:29:03 +08:00
parent 7f5bb11a5f
commit f39631169d
2 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,7 @@ class WechatsController < ActionController::Base
#补全用户信息
uw = UserWechat.find_by_id(params[:openid])
uw.user = user
uw.user_id = user.id
uw.save!
rescue Exception=>e
@wechat_bind_errors = e.message

View File

@ -1,6 +1,6 @@
class UserWechat < ActiveRecord::Base
attr_accessible :subscribe, :openid, :nickname, :sex, :language, :city, :province, :country,
:headimgurl, :subscribe_time, :unionid, :remark, :groupid, :user
:headimgurl, :subscribe_time, :unionid, :remark, :groupid, :user, :user_id
belongs_to :user
end