Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何编辑设计变体消息并删除;电邮;来自它的文本_Ruby On Rails_Devise - Fatal编程技术网

Ruby on rails 如何编辑设计变体消息并删除;电邮;来自它的文本

Ruby on rails 如何编辑设计变体消息并删除;电邮;来自它的文本,ruby-on-rails,devise,Ruby On Rails,Devise,我们正在使用RubyonRails上的DesiveGem作为用户帐户。如果有人在3天后单击我们的验证链接,我们可以看到此消息- Email needs to be confirmed within 3 days, please request a new one 我们在config/locales/develope.en.yml上看到了类似的原因- confirmation_period_expired: "needs to be confirmed within %{period}, ple

我们正在使用RubyonRails上的DesiveGem作为用户帐户。如果有人在3天后单击我们的验证链接,我们可以看到此消息-

Email needs to be confirmed within 3 days, please request a new one
我们在config/locales/develope.en.yml上看到了类似的原因-

confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
但是我已经像这样更改了confirmation\u period\u expired变量-

confirmation_period_expired: " hello world"
但我可以看到这样的验证信息-

Email hello world
希望你能理解这个问题。默认情况下,“电子邮件”文本为提交。我想删除这个

我可以在Desive gem上看到,负责自动添加“电子邮件”文本


现在,请告诉我如何从Deavie Variation消息中删除默认的“电子邮件”文本?

要在Deavie helper上解决此问题,您将看到一个方法resource.errors.full\u消息


您必须在
config/locales/designe.en.yml
中重命名它resource.errors.messages

,它存储简单的本地化字符串。它帮助用户以不同的语言显示相同的消息。我认为如果您不想使用邮件确认,您需要从您的模型中删除
confirmable
,并对其进行重新分类。要从邮件中更改邮件消息,您需要生成Desive的视图。它将在
html.erb
文件所在的位置创建
views/designe/mailers/