Skip to content

Commit

Permalink
Upgrading omniauth to fix undefined method `include?' for nil:NilClas…
Browse files Browse the repository at this point in the history
…s on page load
  • Loading branch information
robban committed Jan 11, 2013
1 parent 3f1a25a commit c1f00ba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source 'http://rubygems.org'

gem 'omniauth-facebook'

group :test do
gem 'sqlite3'
end
Expand Down
8 changes: 4 additions & 4 deletions app/models/authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def allow_destroy?
def assign_account_info(auth_hash)
self.uid = auth_hash['uid']
self.provider = auth_hash['provider']
self.nickname = auth_hash['user_info']['nickname']
self.email = auth_hash['user_info']['email']
self.picture_url = auth_hash['user_info']['image']
self.name = auth_hash['user_info']['name']
self.nickname = auth_hash['info']['nickname']
self.email = auth_hash['info']['email']
self.picture_url = auth_hash['info']['image']
self.name = auth_hash['info']['name']
if auth_hash['credentials']
self.access_token = auth_hash['credentials']['token']
self.access_token_secret = auth_hash['credentials']['secret']
Expand Down
2 changes: 1 addition & 1 deletion community_engine.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<cocaine>, ["0.3.2"])
s.add_dependency(%q<acts_as_commentable>, ["= 3.0.1"])
s.add_dependency(%q<recaptcha>, [">= 0"])
s.add_dependency(%q<omniauth>, ["= 0.3.2"])
s.add_dependency(%q<omniauth>, ["~> 1.1.0"])
s.add_dependency(%q<prototype-rails>, [">= 0"])
s.add_dependency(%q<rails_autolink>, [">= 0"])
s.add_dependency(%q<meta_search>, ["= 1.1.3"])
Expand Down
3 changes: 3 additions & 0 deletions test/testapp/config/initializers/omniauth.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, 'APP_ID', 'APP_SECRET'
end

0 comments on commit c1f00ba

Please sign in to comment.