我有一个具有自定义版本的应用程序Devise::RegistrationsController
。当我尝试运行它时,我收到以下错误:
Failure/Error: post :create
AbstractController::ActionNotFound:
Could not find devise mapping for path "/users".
Maybe you forgot to wrap your route inside the scope block? For example:
devise_scope :user do
match "/some/route" => "some_devise_controller"
end
我不明白为什么会出现此错误,因为从用户的角度来看,一切正常。这是我所拥有的routes/config.rb
:
devise_for :users, :path_names => {:sign_in => 'login', :sign_out => 'logout', :sign_up => 'signup'}
有任何想法吗?在为 Devise 控制器编写规范时,我需要做些什么特别的事情吗?