我收到这样的错误:
uninitialized constant Mobile::OmniauthCallbacksController
这似乎是一个 routes.rb 问题。我究竟需要向我的命名空间添加什么才能使其正常工作?
这是路线范围:
scope :module => :mobile, :as => :mobile do
constraints(:subdomain => /m/) do
devise_for :users, :path => "", :path_names =>
{ :sign_in => "login", :sign_out => "logout",
:sign_up => "signup" },
:controllers => {:sessions => "mobile/sessions" , :passwords => "mobile/passwords" , :confirmations => "mobile/confirmations" , :registrations => "mobile/registrations"}
get "/home" => "home#index" , :as => "home"
end
end
在 routes.rb 文件的其他地方有这样的片段:
devise_scope :user do
get "auth/:provider" => "users/omniauth_callbacks#passthru"
end
但我不确定如何让它在我正在工作的命名空间内工作。有什么想法吗?
谢谢!