Skip to content

Commit

Permalink
Added a before_connect hook to add data to the new model on inital co…
Browse files Browse the repository at this point in the history
…nnection to facebook.
  • Loading branch information
kalasjocke committed Aug 31, 2009
1 parent dd1a9de commit 59f5329
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/authlogic_facebook_connect/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def validate_by_facebook_connect
# We assign it after the call to new in case the attribute is protected.
new_user = klass.new
new_user.send(:"#{facebook_uid_field}=", facebook_session.user.uid)

new_user.before_connect(facebook_session) if new_user.respond_to?(:before_connect)

self.attempted_record = new_user

Expand Down

0 comments on commit 59f5329

Please sign in to comment.