mysql,Linux,HighPerformance,ruby on Rails

2010年11月21日星期日

rails3 Nested Forms blah blah

Rails3 UJS and nested form, I have searched more sample like,eg: this.
I found all reference's source is Ryan Bates nested form exmaple,based in github. but in rails3,i came crome this view [1]. it's all sucks.
the cause reason is the hidden temple default value is false.when sumit action,the hidden values will not discard,and continue update this params.
i see the log,i think maybe some validation is wrong. oh,i found the original accepts_nested_attributes_for is
reject_if => lamda {|a| a.values.all?(&:blank?)}
this is blocker question.
i change the evalution assert to :
reject_if => proc {|a| a[:name].blank? }
attention,the:name is task's attribute name.
this is indicate original code is not working on rails3.
this is all.done.for your convinent test,i have attached my sample deme.have a try.

1.see attached project-nestform.png
2.nestform4rails3.zip

--
tommy xiao
E-mail: xiaods(AT)gmail.com