app/models/user.rb
# completes a user's profile once they link their reddit account
completes a user's profile once they link their reddit account
completes a user ' s profile once they link their reddit account
def update_from_omniauth(auth)
    self.username = auth.info.name
    self.img = auth.extra.raw_info.icon_img
    self.provider = auth.provider
    self.uid = auth.uid
    self.reddit_token = auth.credentials.token
    self.refresh_token = auth.credentials.refresh_token
    self.refresh_duration = auth.credentials.expires_at
  end
def update_from_omniauth ( auth ) self . username = auth . info . name self . img = auth . extra . raw_info . icon_img self . provider = auth . provider self . uid = auth . uid self . reddit_token = auth . credentials . token self . refresh_token = auth . credentials . refresh_token self . refresh_duration = auth . credentials . expires_at end
completes a user's profile once they link their reddit account
completes a user ' s profile once they link their reddit account
auth