“品牌”中的要求不起作用,我不知道为什么。
查看:
<%= simple_form_for(@equipment) do |f| %>
<div class="form-inputs">
<%= f.input :brand, required:true,:label => "test" %>
控制器:
params.require(:equipment)
.permit(:brand, :acquisition_year, :energy_label)
型号:
validates_presence_of :brand, :message => "brand"
答案 0 :(得分:1)
在表单中尝试不带括号:
<%= simple_form_for @equipment do |f| %>
<div class="form-inputs">
<%= f.input :brand, required: true, label: 'test' %>
</div>
[...]
<% end >
答案 1 :(得分:0)
试试这个:
(TokenExpiredException in PayloadValidator.php line 74:Token has expired)
在“真实”
上查看空白区域