Custom validation messages for Session model in Authlogic

我怕爱的太早我们不能终老 提交于 2019-12-10 20:19:04

问题


What's the best way to override validation messages for login/password in the Session model in Authlogic? In the User model Authlogic provides the merge_ methods to override validation options, but Session does not have anything like that.

Any suggestions?


回答1:


Authlogic has it's own I18n class. Maybe it will help you? It uses by default Rails' translation mechanism so it's pretty easy to use.



来源:https://stackoverflow.com/questions/1992552/custom-validation-messages-for-session-model-in-authlogic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!