hur*_*n77 3 unit-testing ruby-on-rails restful-authentication
由于我的rails应用程序在短时间内在测试套件中产生以下运行时错误:
RuntimeError: Declare either attr_protected or attr_accessible for User, but not both.
Run Code Online (Sandbox Code Playgroud)
这可能是由restful_authentication的更新引入的.但是扫描代码"attr_protected"只会告诉我它永远不会被调用.那么为什么会出现这个错
我的用户模型只有以下代码:
attr_accessible :login, :email, :name, :password, :password_confirmation, :identity_url
Run Code Online (Sandbox Code Playgroud)
那应该是完全可以的吗?有什么线索在哪里寻找问题?搜索谷歌显示了一些无知的人,他们也只在测试环境中看到这个问题,偶尔也会在开发环境中看到这个问题.
| 归档时间: |
|
| 查看次数: |
1006 次 |
| 最近记录: |