ruby-on-rails – Rails的客户端验证form_for错误

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – Rails的客户端验证form_for错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用客户端验证rails gem,我收到此错误.任何的想法…..

错误的参数数量(3个用于2)
提取的来源(第1行):

<%= form_for @user,:validate => true do |f| %>

模板包含跟踪:app / views / users / new.html.erb

解决方法

基于 https://github.com/bcardarella/client_side_validations/issues/494,看起来CSV将不再支持Rails 4.

但是它也说明了

I don’t see CSV 4.0 coming out for at least 2 months after Rails 4.0 lands (hopefully not that long) as there will be major changes on the JavaScript side of things. Because it will take so longer and people will want a Rails 4.0 compliant version of CSV suggesting they use master branch or perhaps releasing a alpha or pre version to partially satisfy them while we update might be the correct option.

那么也许尝试从git中提取csv?有一个4.0 beta分支可能值得尝试…

更新

不再主动维护CSV gem.存储库中有3个不同的4.0分支,最近更新的是4-0可用(https://github.com/bcardarella/client_side_validations/branches/all).

更新2

正如@TheChamp所说,CSV gem现在支持rails 4.2!

原文链接:https://www.f2er.com/ruby/267723.html

猜你在找的Ruby相关文章