在我的rails applictaion(Rails 4.2.X)中,出现以下错误: 神秘的是,当我重新加载页面两次或正常加载页面的三倍时...可能是什么问题? 更新: 更新: ...
提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供 中文繁体 英文版本 中英对照 版本,有任何建议请联系yoyou2525@163.com。
我有这个翻译:
contract: "I agree with terms and conditions of the <a href='%{contract_link}' target='_blank'>funding agreement</a> and the <a href='%{mandate_link}' target='_blank'>lawyer's mandate</a>"
调用user.valid?
,即使我在模型中定义了消息错误,也会引发missing interpolation argument :contract_link
异常的情况。
validates_acceptance_of :contract,
on: :create,
allow_nil: false,
message: :contract_not_accepted,
if: :user_has_to_accept_contract?
如果我暂时删除该变量,则一切正常。
知道如何解决此问题吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.