我想通了,没有结果。我有一个名为 User 的模型和带有 STI 粉丝和艺术家的模型,如下所示:
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :confirmable, :lockable,
:recoverable, :rememberable, :trackable, :validatable, **:omniauthable**
end
和我的其他模特
Class Artist < User end
Class Fan < User end
我的路线
devise_for :users
devise_for :artists
devise_for :fans
我在尝试运行我的服务器或其他任何东西时遇到了这个错误
Wrong OmniAuth configuration. If you are getting this exception, it means that either:
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
我的应用程序很先进,不想回去重构它,任何帮助将不胜感激