我一直在考虑如何最好地让我的新应用程序在数据库中表示users表。
我注意到一个迁移名如下:
20110512234640_devise_create_users.rb
这是Device在安装时创建的东西吗?或者,我可以使用一个更简单的用户表迁移吗?
人们通常如何配置Devise,并且仍然能够在用户表中添加他们的特定应用程序可能需要的额外列?
Thanks, Alex
我一直在考虑如何最好地让我的新应用程序在数据库中表示users表。
我注意到一个迁移名如下:
20110512234640_devise_create_users.rb
这是Device在安装时创建的东西吗?或者,我可以使用一个更简单的用户表迁移吗?
人们通常如何配置Devise,并且仍然能够在用户表中添加他们的特定应用程序可能需要的额外列?
Thanks, Alex
通常,您可以在更多的迁移中创建,将自己的字段添加到Devise使用的表中(这是为了保持设计迁移的清晰和简单)
你是对的,这是Devise自动生成的迁移,它允许你更容易地选择你的Devise模块,因为默认模块被添加到迁移中,其他模块也在那里,但有评论。
当然,您可以使用手工编写的用户迁移。
就我个人而言,我使用生成的迁移来添加我自己的额外字段。但是使用自定义用户迁移文件是一样的。
I installed this instant messenger program called IM+ that keeps your accounts online even when you exit the application (you know... touch: only one app at a time) it accepts push deliveries to ...
I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...
Suppose I am writing a server for a particular network protocol. If I know that the client is running on a Windows machine, is it possible for my server to authenticate the Windows user that owns the ...
The infrastructure team wants to update the authentication protocol to NTLMv2 and Kerberos. Will this affect CRM 4.0 on-premise installation. What would need to be changed in order to use the ...
I m developing an ASP.NET MVC site that utilizes forms authentication for part of the application. During development, I need to be able to give external parties access to a development server hosting ...
If I have a type like: public class Context { public Context() { } public IQueryable<Record> Records { get { if (user == someone) //psuedocode ...
We recently attempted to add ip address validation to our website s login security. So in addition to having a cookie with valid credentials, we checked that your ip address on page request matched ...
While looking into forms authorizing/authentication, I found that it is possible to do role based authorizing by adding an array of roles to a FormsAuthenticationTicket. That way I can write User....