module DeviseRussian::Models::Base::InstanceMethods
Public Instance Methods
apply_omniauth(omniauth, with_self=false)
click to toggle source
# File lib/devise_russian/models/base.rb, line 24 def apply_omniauth(omniauth, with_self=false) provider = omniauth['provider'] uid = omniauth['uid'] user_email = omniauth['extra']['raw_info']['email'] rescue nil user_name = omniauth['extra']['raw_info']['first_name'] rescue nil if with_self self.email = user_email if user_email && self.email.blank? self.name = user_name if user_name && self.name.blank? end self.authentications.new( :provider => provider, :uid => uid, :email => user_email, :name => user_name ) end
password_required?()
click to toggle source
Calls superclass method
# File lib/devise_russian/models/base.rb, line 43 def password_required? (authentications.empty? || !password.blank?) && super end