Closed andresilveirah closed 10 years ago
Looks like this regexp is not working with has_one associations. I've fixed it in 6939ec174c5f88f8c9216ee0b84db022cf63c83a.
Could you please test your app with nested_from gem from the master branch?
gem 'nested_form', github: 'ryanb/nested_form'
Thanks!
Hey @lest I just changed my gemfile to use gem 'nested_form', github: 'ryanb/nested_form'
and ran a bundle install on my project folder but the problem still remains.
Checking the file gems/nested_form-0.3.2/lib/nested_form/builder_mixin.rb
still has the old regex.
Am I doing something wrong? That file was supposed to change after your commit right?
You can find gem source location using bundle show nested_form
. Could you please push a test application reproducing this issue? It would help to resolve it. Thanks!
When I use the gem 'nested_form', github: 'ryanb/nested_form'
there's an error on prompting in the javascript console.
Uncaught TypeError: Cannot read property '1' of null (jquery_nested_form:line20)
And when I went back to the gem 'nested_form'
everything worked fine (except the jquery event for removing the field)
As you suggested, I've pushed a small app to show this behavior.
https://github.com/andresilveira/nested_form_app
I hope it's useful.
Thanks for a test application.
I've fixed this js error in the master branch and tested with your test app (changed this line to "nested:fieldRemoved:comment").
Great! It worked as a charm :D Thanks @lest
Hello I'm using 0.3.2, ruby 1.9.3p448 and Rails 3.2.14. I'm trying to limit the number of nested fields in a form, in order to implement a has_one association. The problem is that the nested:fieldRemoved: is not being triggered while the nested:fieldAdded:model and nested:fieldRemoved are working perfectly fine.
Here are my coffee and view codes:
The form
The partial _financial_tax_fields
Here is the coffee script: