认证后回复消息
This commit is contained in:
parent
7f5bb11a5f
commit
f39631169d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue