在 javascript 中访问 rails 路由 [英] Accessing rails routes in javascript
本文介绍了在 javascript 中访问 rails 路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能解释我如何在 javascript 中访问 rails 路线/命名路线?
Can anyone explain how i can access the rails routes/names routes in javascript ?
以下是我尝试过的一些事情http://github.com/jsierles/js_named_routes.
The following are some of the things i tried http://github.com/jsierles/js_named_routes.
但没有运气.
推荐答案
这个问题我研究了一段时间,没有找到任何兼容 Rails 3 的实现.
I was researching this question for a while and didn't found any implementation compatible with Rails 3.
所以决定自己写:
https://github.com/railsware/js-routes
这篇关于在 javascript 中访问 rails 路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文