传request参数

This commit is contained in:
guange 2016-02-28 22:28:44 +08:00
parent 0ab579af98
commit 35f9dc6e77
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ class WechatsController < ActionController::Base
end end
on :event, with: 'subscribe' do |request| on :event, with: 'subscribe' do |request|
sendBind sendBind(request)
end end
# When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account # When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account
@ -147,11 +147,11 @@ class WechatsController < ActionController::Base
url: n[:url] url: n[:url]
end end
else else
sendBind sendBind(request)
end end
end end
def sendBind def sendBind(request)
openid = request[:FromUserName] openid = request[:FromUserName]
attrs = wechat.user(openid) attrs = wechat.user(openid)
UserWechat.delete_all(openid: openid) UserWechat.delete_all(openid: openid)