【发布时间】:2011-08-13 01:44:30
【问题描述】:
我现在收到以下错误(实际上并没有更改代码,但开始发生):
undefined method `downcase' for nil:NilClass
在使用 OmniAuth 进行身份验证(并获取/存储访问令牌/密码后)我的控制器中有这个
7 def show
8 @user = User.find(params[:id])
9 @client = LinkedIn::Client.new(ENV["LINKEDIN_KEY"], ENV["LINKEDIN_SECRET"])
10 @client.authorize_from_access(@user.atoken, @user.asecret)
11 if @user == current_user
12 @client.profile
13 else
14 @client.profile(:id => @user.uid)
15 end
16 end
试图找到问题让我发疯。
【问题讨论】:
标签: ruby-on-rails oauth linkedin omniauth