pls は、繭の 'link_to_add_association' を html_options と共に使用する例を示しています。 https://github.com/nathanvda/cocoon
ドキュメントには次のように記載されています。
html_options: extra html-options (see link_to) There are two extra options that allow to conrol the placement of the new link-data:
data-association-insertion-node : the jquery selector of the node
data-association-insertion-position : insert the new data before or after the given node.
しかし、「要素を追加」リンクの直前に部分的に挿入したい場合、どうすればよいかわかりません。親のdivが始まった直後ではありません。これはうまくいきません:
<%= link_to_add_association "add element", f, :production_years, :position => "after_all" %>