小编mar*_*rna的帖子

为没有STI的多个模型设计Omniauth

有没有办法为没有STI的多个模型配置Devise Omniauth?

我们有模特学生和教授,我们不想使用STI,但现在我们意识到Devise with Omniauth不适合多种模式.

.rvm/gems/ruby-1.9.3-p125/gems/devise-2.1.0/lib/devise/rails/routes.rb:384:in `devise_omniauth_callback': Wrong OmniAuth configuration. If you are getting this exception, it means that either: (RuntimeError)

1) You are manually setting OmniAuth.config.path_prefix and it doesn't match the Devise one
2) You are setting :omniauthable in more than one model
3) You changed your Devise routes/OmniAuth setting and haven't restarted your server
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails devise omniauth

9
推荐指数
1
解决办法
2106
查看次数

标签 统计

devise ×1

omniauth ×1

ruby-on-rails ×1