Module: Devise::Models::DeviseOauth2Facebook
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise_oauth2_facebook/model.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #active? ⇒ Boolean
- #do_update_facebook_user(fb_user, token) ⇒ Object
- #update_facebook_user(fb_user) ⇒ Object
Instance Method Details
#active? ⇒ Boolean
19 20 21 |
# File 'lib/devise_oauth2_facebook/model.rb', line 19 def active? true end |
#do_update_facebook_user(fb_user, token) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/devise_oauth2_facebook/model.rb', line 7 def do_update_facebook_user(fb_user, token) self.send("#{self.class.facebook_uid_field}=".to_sym, fb_user["id"]) self.send("#{self.class.facebook_token_field}=".to_sym, token) self.email = fb_user.email.to_s.downcase if fb_user.email.present? update_facebook_user(fb_user) self.save(:validate => false) end |
#update_facebook_user(fb_user) ⇒ Object
15 16 17 |
# File 'lib/devise_oauth2_facebook/model.rb', line 15 def update_facebook_user(fb_user) # override me end |