Skip to content

Commit b6268b6

Browse files
author
Nicholas Watson
committed
completed facebook integration
1 parent 47142b8 commit b6268b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/models/entropi_social/profile.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class EntropiSocial::Profile < ActiveRecord::Base
1818
has_one :photo, :as => :photoable
1919
has_many :groups, :as => :groupable
2020

21-
validates_presence_of :first_name, :last_name, :birth_date
21+
validates_presence_of :first_name, :last_name
2222
accepts_nested_attributes_for :photo
2323

2424
def full_name

lib/entropi_social/strategies/facebook.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def find_for_facebook_oauth(access_token, signed_in_resource=nil)
1313
if user = User.where(:email => data.email).first
1414
user
1515
else # Create a user with a stub password.
16-
User.create!(:email => data.email, :password => Devise.friendly_token[0,20], :profile => profile)
16+
user = User.create!(:email => data.email, :password => Devise.friendly_token[0,20])
1717
profile = user.build_profile(:first_name => access_token.info.first_name, :last_name => access_token.info.first_name)
1818
profile.save!
1919
return user

0 commit comments

Comments
 (0)