User.find_for_oauth - 在哪里可以找到它? [英] User.find_for_oauth - where can I find it?

查看:117
本文介绍了User.find_for_oauth - 在哪里可以找到它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习Devise + omniauth。
在大多数示例中,我找到方法User.find_for_oauth



在哪里可以找到此方法的文档?它的进出口?
是由Devise还是omniauth gems提供?



here here 是我遇到的一些例子。

解决方案

User.find_for_oauth ()不是由Devise或Omniauth提供的。这是您必须提供的东西。



再次查看您提供的链接中的示例。他们显示find_for_auth的代码。第一个链接在基本实现部分的app / models / user.rb代码中。第二个在ActiveRecordHelpers类中,它们包含在他们的User模型中。


I'm studying Devise + omniauth. In most examples I find method User.find_for_oauth

Where can I find docs for this method & its ins and outs? Is it provided by Devise or omniauth gems?

here and here are some examples where I came across it.

解决方案

The User.find_for_oauth() isn't provided by Devise or Omniauth. It's something you have to provide.

Have another look at the examples in the links you gave. They show code for find_for_auth. The first link has it in the app/models/user.rb code in the Basic Implementation section. The second has it in an ActiveRecordHelpers class which they include in their User model.

这篇关于User.find_for_oauth - 在哪里可以找到它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆