我有这个翻译:
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?
如果我暂时删除变量,一切正常。
我知道如何解决这个问题吗?