本文介绍了使用jquery和ajax在客户端调用Rails服务器方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在红宝石上工作,这是我的新手.

我需要在应用程序中已经存在的链接的onclick事件中调用Rails控制器方法.

我了解到无法通过运行客户端的javascript调用Rails服务器方法.

如果有人帮助我用ajax编写jquery来执行此操作,我将不胜感激.

Hi,
I am working in ruby on rails and i am new to that.

I need to invoke a rails controller method as onclick event of already existing links in my application.

I learnt that it is not possible to invoke rails server method throug javascript which runs client side.

I would appreciate if anyone help me to write jquery with ajax for doing this thing.

推荐答案



这篇关于使用jquery和ajax在客户端调用Rails服务器方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 05:18
查看更多