Rails 中的 Devise 未创建用于创建配置文件的路线
我刚刚使用 Devise 创建了一系列路线,但没有创建一条值得注意的路线:创建帐户。
这是我在迁移中的内容:
create_table(:users, :options => 'ENGINE=InnoDB DEFAULT CHARSET=utf8') do |t| t.database_authenticatable :null =>错误的 t.可恢复 t.可记住的 t.可追踪 t.可确认的 t.encryptable
这是我的相关 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"}
user_password POST /users/password(.:format) {:action=>"create", :controller=>"devise/passwords"}
new_user_password GET /users/password/new(.:format) {:action=>"new", :controller=>"devise/passwords"}
edit_user_password GET /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"}
PUT /users/password(.:format) {:action=>"update", :controller=>"devise/passwords"}
user_confirmation POST /users/confirmation(.:format) {:action=>"create", :controller=>"devise/confirmations"}
new_user_confirmation GET /users/confirmation/new(.:format) {:action=>"new", :controller=>"devise/confirmations"}
GET /users/confirmation(.:format) {:action=>"show", :controller=>"devise/confirmations"}
知道为什么没有创建 create-profile 路由以及如何做吗?
谢谢!
I just created a bunch of routes with Devise, but one notable route was not created: to make an account.
Here is what I have in my migration:
create_table(:users, :options => 'ENGINE=InnoDB DEFAULT CHARSET=utf8') do |t|
t.database_authenticatable :null => false
t.recoverable
t.rememberable
t.trackable
t.confirmable
t.encryptable
And here are my relevant rake routes
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"}
user_password POST /users/password(.:format) {:action=>"create", :controller=>"devise/passwords"}
new_user_password GET /users/password/new(.:format) {:action=>"new", :controller=>"devise/passwords"}
edit_user_password GET /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"}
PUT /users/password(.:format) {:action=>"update", :controller=>"devise/passwords"}
user_confirmation POST /users/confirmation(.:format) {:action=>"create", :controller=>"devise/confirmations"}
new_user_confirmation GET /users/confirmation/new(.:format) {:action=>"new", :controller=>"devise/confirmations"}
GET /users/confirmation(.:format) {:action=>"show", :controller=>"devise/confirmations"}
Any idea why the create-profile route was not made and how to do it?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您缺少可注册模块。您可能需要将其添加到您的用户模型中。
例子:
You're missing the Registerable-module. You probably need to add it to your User-model.
Example: