pls는 html_options와 함께 Cocoon의 'link_to_add_association'을 사용하는 예를 보여줍니다.레일 3.1. Cocoon link_to_add_association 예가 필요합니다.
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.
하지만 난 그냥 내 "요소를 추가"링크를하기 전에 부분적으로 삽입하려는 경우 내가, 무엇을 이해할 수 없다 : https://github.com/nathanvda/cocoon
문서는 말한다. 부모의 div 시작 직후가 아닙니다. 이없는 거 일 :
<퍼센트 = link_to_add_association "요소를 추가", F : production_years, => "after_all"%이>
한이 -이 많이 필요했다. 고맙습니다! – Jordan
나는 https://github.com/nathanvda/cocoon#control-the-insertion-behaviour (또는 적어도 이전보다 좋음)이 잘 문서화되었다고 생각했다. – nathanvda
그렇습니다. 어떻게 든 나는 그것을 놓쳤다. 그것을 지적 주셔서 감사합니다. – Jordan