Should I implement the new
, create
, edit
, update
and destroy
actions on a controller whose corresponding model uses Devise's :registerable
module?
我应该在控制器上实现新的、创建、编辑、更新和销毁操作吗?
In other words, should I keep the CRUD interface even though Devise manages the registration process for me?
换句话说,我是否应该保留CRUD接口,即使设计为我管理注册过程?
1 个解决方案
#1
5
If you want to manage your User
s (or whatever your Devise model is called) via a CRUD interface, you'll need to have those actions available. Unless I'm mistaken, if you manage your User
s with a CRUD setup, you'll need to remove the :registerable
from the model.
如果您想通过CRUD接口管理您的用户(或您的设计模型被调用的任何东西),您将需要这些操作可用。除非我弄错了,否则如果您使用CRUD设置管理您的用户,您需要从模型中删除:registerable。
If you want need/want a CRUD interface for your User
s, you can remove the CRUD actions (Devise will work fine without a CRUD interface, or CRUD actions in your controller).
如果您希望为您的用户提供CRUD接口,您可以删除CRUD操作(在没有CRUD接口或控制器中的CRUD操作的情况下,设计将可以正常工作)。
#1
5
If you want to manage your User
s (or whatever your Devise model is called) via a CRUD interface, you'll need to have those actions available. Unless I'm mistaken, if you manage your User
s with a CRUD setup, you'll need to remove the :registerable
from the model.
如果您想通过CRUD接口管理您的用户(或您的设计模型被调用的任何东西),您将需要这些操作可用。除非我弄错了,否则如果您使用CRUD设置管理您的用户,您需要从模型中删除:registerable。
If you want need/want a CRUD interface for your User
s, you can remove the CRUD actions (Devise will work fine without a CRUD interface, or CRUD actions in your controller).
如果您希望为您的用户提供CRUD接口,您可以删除CRUD操作(在没有CRUD接口或控制器中的CRUD操作的情况下,设计将可以正常工作)。