问题标签 [cocoonjs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
30 浏览

ruby-on-rails - 茧添加记录后如何执行功能?

我在我的rails项目中使用cocoon gem,我有两个“link_to_add_association”,但我需要根据按下哪个link_to来执行某个功能,id为“link_1”的link_to将记录添加到开头表和另一个在末尾添加其他值的记录,这是我的部分形式:

我试过这段代码,但我找不到让它工作的方法