app/models/user.rb
def apply_omniauth (omniauth)
    # Note that we use string keys (not symbols) for the 'omniauth' hash.
    # This is because depending on where 'apply_omniauth' is called from (from
    # 'from_omniauth' or 'new_with_session'), the hash provided may or may not
    # accept symbols as keys, but it always accepts strings.
    self.email = omniauth['info']['email'] if self.email.blank?
    authentications.build provider: omniauth['provider'], uid: omniauth['uid']
  end
# Pre-populates this user's fields (to the extent possible), with data made
# available by OmniAuth.
Pre-populates this user's fields (to the extent possible), with data made
available by OmniAuth.
Pre - populates this user ' s fields ( to the extent possible ) with data made available by OmniAuth .
def apply_omniauth (omniauth)
    self.email = omniauth['info']['email'] if self.email.blank?
    authentications.build provider: omniauth['provider'], uid: omniauth['uid']
  end
def apply_omniauth ( omniauth ) self . email = omniauth [ 'info' ] [ 'email' ] if self . email . blank? authentications . build provider : omniauth [ 'provider' ] , uid : omniauth [ 'uid' ] end
Pre-populates this user's fields (to the extent possible), with data made
available by OmniAuth.
Pre - populates this user ' s fields ( to the extent possible ) with data made available by OmniAuth .
# Note that we use string keys (not symbols) for the 'omniauth' hash. # This is because depending on where 'apply_omniauth' is called from (from # 'from_omniauth' or 'new_with_session'), the hash provided may or may not # accept symbols as keys, but it always accepts strings.
omniauth