jQuery + Rails有问题,是真的吗? [英] Jquery + Rails problematic, is that true?
问题描述
我在上一个问题中看到了评论,说最好将Prototype与Rails一起使用.但是,我自己的经验是Jquery是高级Javascript库.作为Rails的新手,我尚未研究如何在Rails中使用Jquery,但我认为这可以工作.这可能是一个有问题的组合,尤其是与Ajax有关,并且我可能需要改用Prototype是否正确?
I saw comments in a previous question saying that it is best to use Prototype with Rails. However, my own experience is that Jquery is a superior Javascript library. Being new to Rails, I have not yet investigated how to use Jquery with Rails but I assumed this would work. Is it correct that this may be a problematic combination - especially in relation to Ajax - and that I may need to use Prototype instead?
推荐答案
三年以来,我一直在使用Rails和(排他性的)jquery从事我的所有项目.到目前为止,从未真正遇到任何(严重)问题.
I've worked on all my projects since 3 years with rails and (exclusively) jquery. Never really encountered any (serious) problems so far.
有一个名为jrails的插件,可以代替原型.
There is a plugin called jrails, which acts as a drop-in replacement for prototype.
http://github.com/aaronchi/jrails/tree/master
更新:有了它,您就可以使用
Update: with it you can get all of the same default Rails helpers for javascript functionality using
这篇关于jQuery + Rails有问题,是真的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!