我用以下用户表安装rails3.0.4和devise
create_table "users", :force => true do |t|
t.string "login"
t.string "email"
t.string "crypted_password", :null => false
t.string "password_salt", :null => false
t.string "persistence_token", :null => false
t.string "single_access_token", :null => false
t.string "perishable_token", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "database_authenticatable", :null => false
t.string "recoverable"
t.string "rememberable"
t.string "trackable"
t.string "reset_password_token"
end
用户表不是由设计创建的,但我在迁移中添加了必要的列 . 并在config / initializers / devise.rb中进行以下设置
config.authentication_keys = [ :email]
但每次我尝试注册为新用户时,它会抛出:
2 errors prohibited this user from being saved:
Login is too short (minimum is 3 characters)
Login should use only letters, numbers, spaces, and .-_@ please.
任何想法为什么会发生?