【问题标题】:Devise 1.5.3 and Flash Message Presentation?设计 1.5.3 和 Flash 消息演示?
【发布时间】:2012-10-04 21:52:44
【问题描述】:
如果您使用的是可注册和可确认的,为什么您只能获得可注册样式的 Flash 消息?
Active Admin 修改了我的 il8n 配置,并且不会显示我的 devise.en.yml 文件。
我只是想让我的员工知道他们正在收到一封电子邮件。与可确认的消息相同,但仅显示可注册的消息。
我尝试在我的模型中将可确认放在可注册之前,但这并没有改变任何东西。
想法?
【问题讨论】:
标签:
devise
activeadmin
devise-confirmable
【解决方案1】:
事实证明,您需要在 devise.en.yml 文件前添加以下内容:
registrations:
user:
signed_up: 'Welcome friend! You have signed up successfully.'
inactive_signed_up: 'Yo! You done signed up. Please Check your email and click the confirmation link to continue.'
在发现这一点之前,我没有在前面加上user:,因为我们也有admin:,这要感谢活跃的管理员。添加user: 是关键。
希望谷歌会为那些试图更改设计 en.yml 文件但它没有生效的人找到这个。