Module: Devise::Models::DeviseOauth2CanvasFacebook::ClassMethods
- Defined in:
- lib/devise_oauth2_canvas_facebook/model.rb
Instance Method Summary collapse
- #create_with_facebook_user(fb_user, token, client, options) ⇒ Object
- #find_with_facebook_user(fb_user, token, client, options) ⇒ Object
Instance Method Details
#create_with_facebook_user(fb_user, token, client, options) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/devise_oauth2_canvas_facebook/model.rb', line 36 def create_with_facebook_user(fb_user, token,client, ) user = new(facebook_uid_field.to_sym => fb_user.id, :password => "fakepass", :password_confirmation => "fakepass") user.skip_confirmation! if user.respond_to?(:skip_confirmation!) user.do_update_facebook_user(fb_user, token, client, ) user end |
#find_with_facebook_user(fb_user, token, client, options) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/devise_oauth2_canvas_facebook/model.rb', line 28 def find_with_facebook_user(fb_user, token,client, ) user = where(facebook_uid_field.to_sym => fb_user.id).first if user user.do_update_facebook_user(fb_user, token, client,) end user end |