Module: Devise::Models::DeviseOauth2CanvasFacebook

Extended by:
ActiveSupport::Concern
Defined in:
lib/devise_oauth2_canvas_facebook/model.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/devise_oauth2_canvas_facebook/model.rb', line 19

def active?
  true
end

#do_update_facebook_user(fb_user, token, client, options) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/devise_oauth2_canvas_facebook/model.rb', line 7

def do_update_facebook_user(fb_user, token, client, options)
  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, client, options)
  self.save(:validate => false)
end

#update_facebook_user(fb_user, client, options) ⇒ Object



15
16
17
# File 'lib/devise_oauth2_canvas_facebook/model.rb', line 15

def update_facebook_user(fb_user, client, options)
  # override me
end