Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/53.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 Rails简单表单弃用警告_Ruby On Rails_Simple Form - Fatal编程技术网

Ruby on rails Rails简单表单弃用警告

Ruby on rails Rails简单表单弃用警告,ruby-on-rails,simple-form,Ruby On Rails,Simple Form,简单表格2.0.1 客户端验证3.1.4 问题: "error_class":"DEPRECATION WARNING: [SIMPLE_FORM] SimpleForm.error_class is deprecated and has no effect. (called from error_class at (eval):1)", "error_tag":"DEPRECATION WARNING: [SIMPLE_FORM] SimpleForm.error_tag is depreca

简单表格2.0.1 客户端验证3.1.4

问题:

"error_class":"DEPRECATION WARNING: [SIMPLE_FORM] SimpleForm.error_class is deprecated and has no effect. (called from error_class at (eval):1)",
"error_tag":"DEPRECATION WARNING: [SIMPLE_FORM] SimpleForm.error_tag is deprecated and has no effect. (called from error_tag at (eval):1)",
"wrapper_error_class":"DEPRECATION WARNING: [SIMPLE_FORM] SimpleForm.wrapper_error_class is deprecated and has no effect. (called from wrapper_error_class at (eval):1)",
"wrapper_tag":"DEPRECATION WARNING: [SIMPLE_FORM] SimpleForm.wrapper_tag is deprecated and has no effect. (called from wrapper_tag at (eval):1)"
如何解决

我的看法是:

<%= simple_form_for @book_item, :validate => true do |f| %>
  <%= f.input :name %>
  <%= f.input :description %>
  <%= f.button :submit %>
  <%= link_to t('.cancel', :default => t("helpers.links.cancel")), book_items_path, :class => 'btn' %>
<% end %>
true do | f |%>
t(“helpers.links.cancel”)),书籍项目路径:class=>“btn”%>

我假设您正在使用
客户端验证-simple\u表单
gem进行SimpleForm集成,但它现在不适用于SimpleForm 2-

我假设您正在使用
客户端验证-simple\u表单
gem进行SimpleForm集成,但它现在不适用于SimpleForm 2-

试试看