问题
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