I would like to replace this error message with something more instructive, to help the user understand what to do next. Unfortunately I can't seem to find this anywhere in my source; where is it coming from and how can I amend it?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Look in config/locales/YOUR_LOCALE.yml
and set the following key:
errors:
messages:
taken: "has already been taken"
You can find translated files for multiple languages here: https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale