nested_forms 在 Rails 3.1 资源管道中添加 2 个副本并删除第一个副本
Rails 3.1
Ran into some issues setting up and might have hacked the wrong solution together.
Any ideas on why...
link_to_add
is creating 2 copieslink_to_destroy
is destroying the wrong copy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此问题与 Nested_forms 无关,与
rake asset:precompile
有关。在推送到 Heroku 之前我进行了预编译(不必要),这给我留下了两个副本和奇怪的 jQuery 行为。This issue was not related to Nested_forms, it was related to
rake assets:precompile
. I was precompiling (unnecessarily) before pushing to Heroku which left me with two copies and strange jQuery behavior.我面临着同样的问题。
我已将nested_form.js 包含在我的应用程序布局文件中。
我没有更改我的 app/assets/javascripts/application.js 文件,它是在创建 Rails 应用程序时创建的。
当我从应用程序布局中删除条目时,问题就解决了。
I was facing same issue.
I had included nested_form.js in my application layout file.
And I haven't changed my app/assets/javascripts/application.js file, it is as it is, when it was created at time of creating rails application.
When I removed entry from my application layout, problem was solved.