Devise 'translation missing' error with subclassed controller

橙三吉。 提交于 2020-01-01 08:40:12

问题


I've subclassed Devise::RegistrationsController. The subclassed controller, in my case, is AdminRegistrationsController.

But, when I sign up a new admin, for example, the flash shows the message:

translation missing: en.devise.admin_registrations.admin.signed_up

I've verified an entry exists in config/locales/devise.en.yml. Here's the snippet:

en:
  devise:
    registrations:
      signed_up: 'Welcome! You have signed up successfully.'

What am I missing?


回答1:


You must do this :

en:
  devise:
    admin_registrations:
      admin:
        signed_up: 'Welcome! You have signed up successfully.'


来源:https://stackoverflow.com/questions/11620767/devise-translation-missing-error-with-subclassed-controller

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