rails/activeform — pull request #27 by kirs (2014-12-03 01:10:54+00:00)
Title: Reworked JS helpers with APi #17

@dfyx noticed that there is no way to add new fields in JS without using buttons.
Here is my implementation (may not work yet on edge cases) with an API:

```js
$(".task_list").addFormField("tasks") # receives association name, .task_list is container with fields
$(".task_list").removeFormField("tasks", 2) // destroys second field in the form
```

Example of form code can be found here: https://github.com/kirs/activeform/blob/e9375a9d6fac5e0e9ff893dc30e22e2e8bb112dd/test/dummy/app/views/assignments/_form.html.erb