Class: User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/user.rb

Instance Method Summary collapse

Instance Method Details

#apply_omniauth(omniauth) ⇒ Object



12
13
14
# File 'app/models/user.rb', line 12

def apply_omniauth(omniauth)
  authentications.build(:provider => omniauth['provider'], :uid => omniauth['uid'])
end

#password_required?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/models/user.rb', line 16

def password_required?
  (authentications.empty? || !password.blank?) && super
end