开发者

simple_form_for error: wrong number of arguments (3 for 2), in rails 3

开发者 https://www.devze.com 2023-03-18 16:58 出处:网络
I am getting wrong number of arguments (3 for 2) error for simple_form_for tag in rails 3 (with haml).

I am getting wrong number of arguments (3 for 2) error for simple_form_for tag in rails 3 (with haml). Interestingly it was working fine some moment back.

= simple_form_for(:user,@user, :url => user_path, :remote => true, :html => { :id => "locate", :class=>"locateform" })开发者_Go百科 do |f

any pointers/help would be great.

Thanks


This part looks suspicious.

:user,@user,

Did you acciddentally delete the :as => ? I think it should be

:user, :as => @user
0

精彩评论

暂无评论...
验证码 换一张
取 消