【发布时间】:2014-08-19 11:57:08
【问题描述】:
我的设计有问题。我的应用程序是新的,仅在以下位置找到标准代码:http://railscasts.com/episodes/209-introducing-devise?view=asciicast
一切都完全一样,但是在我的设计启动后,它会将我发送到 : ocalhost:3000/users.user 并显示此错误。
编辑:
我没有弄乱任何功能。这是我的 rake 路线:
new_user_session GET /users/sign_in(.:format) {:action=>"new", :controller=>"devise/sessions"}
user_session POST /users/sign_in(.:format) {:action=>"create", :controller=>"devise/sessions"}
destroy_user_session GET /users/sign_out(.:format) {:action=>"destroy", :controller=>"devise/sessions"}
password POST /users/password(.:format) {:action=>"create", :controller=>"devise/passwords"}
new_password GET /users/password/new(.:format) {:action=>"new", :controller=>"devise/passwords"}
edit_password GET /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"}
PUT /users/password(.:format) {:action=>"update", :controller=>"devise/passwords"}
registration POST /users(.:format) {:action=>"create", :controller=>"devise/registrations"}
new_registration GET /users/sign_up(.:format) {:action=>"new", :controller=>"devise/registrations"}
edit_registration GET /users/edit(.:format) {:action=>"edit", :controller=>"devise/registrations"}
PUT /users(.:format) {:action=>"update", :controller=>"devise/registrations"}
DELETE /users(.:format) {:action=>"destroy", :controller=>"devise/registrations"}
confirmation POST /users/confirmation(.:format) {:action=>"create", :controller=>"devise/confirmations"}
new_confirmation GET /users/confirmation/new(.:format) {:action=>"new", :controller=>"devise/confirmations"}
GET /users/confirmation(.:format) {:action=>"show",:controller=>"devise/confirmations"}
root / {:controller=>"home", :action=>"index"}
【问题讨论】:
-
未知动作 AbstractController::ActionNotFound
-
听起来你有一些路径问题。您是否覆盖了 after_sign_up_path_for(resource) 方法?您是否修改了设计视图?您能否在终端中执行
rake routes并向我们展示设计的具体路径 -
有关使用 Devise 的简单 Rails 应用程序的最新示例,请参阅 RailsApps 项目中的 rails-devise 示例应用程序。我还写了一个Rails Devise Tutorial 可能会有所帮助。
-
我没有弄乱任何功能。这是我的 rake 路线:
-
@DanielKehoe 谢谢,但我宁愿直接解决这个问题,这样我才能深入了解这些东西。
标签: ruby-on-rails devise